Initial commit - clean project structure

This commit is contained in:
2026-08-18 16:48:15 +03:30
commit 331148037e
147 changed files with 5543 additions and 0 deletions

16
statuslog/receivers.py Normal file
View File

@@ -0,0 +1,16 @@
from .models import StatusChangeLog
from .signals import status_changed
def _log_status_change(sender, **kwargs):
StatusChangeLog.objects.create(
label=sender,
object_id=kwargs['object_id'],
old_status=kwargs.get('old_status', ''),
new_status=kwargs['new_status'],
event=kwargs['event'],
user_id=kwargs.get('user_id'),
)
status_changed.connect(_log_status_change, dispatch_uid='statuslog_log_status_change')