[init] Initial commit

This commit is contained in:
ITQ
2024-03-31 21:02:53 +03:00
commit 04d4e83d1f
105 changed files with 8559 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
from rest_framework import generics
from rest_framework.permissions import IsAuthenticated
from notifications.models import Notification
from notifications.serializers import NotificationSerializer
class UserNotificationsAPIView(generics.ListAPIView):
serializer_class = NotificationSerializer
permission_classes = [IsAuthenticated]
def get_queryset(self):
user = self.request.user
return Notification.objects.by_user(user.id)