diff --git a/core/apps/finance/serializers/expence.py b/core/apps/finance/serializers/expence.py index 4055fda..be1ab8d 100644 --- a/core/apps/finance/serializers/expence.py +++ b/core/apps/finance/serializers/expence.py @@ -70,9 +70,7 @@ class ExpenceCreateSerializer(serializers.ModelSerializer): expence.counterparty.debit_usd += validated_data.get('price') expence.counterparty.total_debit += expence.price expence.counterparty.save() - body = f""" - {user.full_name} {expence.price} {expence.currency.upper()}... \n screen: /monitoring - """ + body = f"""{user.full_name} {expence.price} {expence.currency.upper()}... \n screen: /monitoring""" notify_user(user=user, title="Tasdiqlang yoki rad eting", body=body) cash_transaction.save() payment_type.save() diff --git a/core/apps/notifications/admin/__init__.py b/core/apps/notifications/admin/__init__.py new file mode 100644 index 0000000..b70bf7e --- /dev/null +++ b/core/apps/notifications/admin/__init__.py @@ -0,0 +1 @@ +from .notification import * \ No newline at end of file diff --git a/core/apps/notifications/admin/notification.py b/core/apps/notifications/admin/notification.py new file mode 100644 index 0000000..2174051 --- /dev/null +++ b/core/apps/notifications/admin/notification.py @@ -0,0 +1,5 @@ +from django.contrib import admin + +from core.apps.notifications.models import Notification + +admin.site.register(Notification) \ No newline at end of file diff --git a/core/apps/notifications/apps.py b/core/apps/notifications/apps.py index eb827b0..023ea83 100644 --- a/core/apps/notifications/apps.py +++ b/core/apps/notifications/apps.py @@ -4,3 +4,6 @@ from django.apps import AppConfig class NotificationsConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'core.apps.notifications' + + def ready(self): + import core.apps.notifications.admin \ No newline at end of file