def log_project_component_changes(sender, project, component, user, **kwargs):
with translation.override(settings.DEFAULT_LANGUAGE):
message = _(
'"{username}" modified the component "{component_label}"'
' of the project "{project_name}".').format(
username=user.username,
project_name=project.name,
component_label=component.label)
models.LogEntry.objects.create(
message=message,
action=models.PROJECT_COMPONENT_UPDATED,
actor=user,
component_identifier=component.identifier,
project=project,
module=None
)
评论列表
文章目录