69 lines
1.9 KiB
Python
69 lines
1.9 KiB
Python
COMMON_EXCLUDED_FIELDS = [
|
|
"created_at",
|
|
"updated_at",
|
|
"deleted_at",
|
|
"created_by",
|
|
"updated_by",
|
|
]
|
|
|
|
AUDITLOG_INCLUDE_ALL_MODELS = False
|
|
AUDITLOG_STORE_JSON_CHANGES = True
|
|
AUDITLOG_USE_TEXT_CHANGES_IF_JSON_IS_NOT_PRESENT = True
|
|
AUDITLOG_INCLUDE_TRACKING_MODELS = [
|
|
{
|
|
"model": "workspaces.Workspace",
|
|
"exclude_fields": COMMON_EXCLUDED_FIELDS,
|
|
"serialize_data": True,
|
|
"serialize_auditlog_fields_only": True,
|
|
},
|
|
{
|
|
"model": "workspaces.WorkspaceMembership",
|
|
"exclude_fields": COMMON_EXCLUDED_FIELDS,
|
|
"serialize_data": True,
|
|
"serialize_auditlog_fields_only": True,
|
|
},
|
|
{
|
|
"model": "workspaces.WorkspaceUserRate",
|
|
"exclude_fields": COMMON_EXCLUDED_FIELDS,
|
|
"serialize_data": True,
|
|
"serialize_auditlog_fields_only": True,
|
|
},
|
|
{
|
|
"model": "clients.Client",
|
|
"exclude_fields": COMMON_EXCLUDED_FIELDS,
|
|
"serialize_data": True,
|
|
"serialize_auditlog_fields_only": True,
|
|
},
|
|
{
|
|
"model": "projects.Project",
|
|
"exclude_fields": COMMON_EXCLUDED_FIELDS,
|
|
"serialize_data": True,
|
|
"serialize_auditlog_fields_only": True,
|
|
},
|
|
{
|
|
"model": "projects.ProjectMembership",
|
|
"exclude_fields": COMMON_EXCLUDED_FIELDS,
|
|
"serialize_data": True,
|
|
"serialize_auditlog_fields_only": True,
|
|
},
|
|
{
|
|
"model": "tags.Tag",
|
|
"exclude_fields": COMMON_EXCLUDED_FIELDS,
|
|
"serialize_data": True,
|
|
"serialize_auditlog_fields_only": True,
|
|
},
|
|
{
|
|
"model": "time_entries.TimeEntry",
|
|
"exclude_fields": COMMON_EXCLUDED_FIELDS,
|
|
"m2m_fields": {"tags"},
|
|
"serialize_data": True,
|
|
"serialize_auditlog_fields_only": True,
|
|
},
|
|
{
|
|
"model": "reports.ReportExportJob",
|
|
"exclude_fields": COMMON_EXCLUDED_FIELDS,
|
|
"serialize_data": True,
|
|
"serialize_auditlog_fields_only": True,
|
|
},
|
|
]
|