Initial commit: Aurora Moments self-hosted photo/video sharing platform
Django/DRF + PostgreSQL/Redis/Celery backend with accounts, library, moments, and notifications apps; React/TypeScript/Vite frontend with Instagram-style sidebar nav, feed, profiles, nested comment replies, notifications, and photo/video upload with ffmpeg-generated posters. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
from rest_framework import serializers
|
||||
|
||||
from apps.accounts.serializers import UserSerializer
|
||||
|
||||
from .models import Notification
|
||||
|
||||
|
||||
class NotificationSerializer(serializers.ModelSerializer):
|
||||
actor = UserSerializer(read_only=True)
|
||||
moment_id = serializers.IntegerField(read_only=True)
|
||||
comment_id = serializers.IntegerField(read_only=True)
|
||||
|
||||
class Meta:
|
||||
model = Notification
|
||||
fields = ["id", "actor", "verb", "moment_id", "comment_id", "is_read", "created_at"]
|
||||
read_only_fields = fields
|
||||
Reference in New Issue
Block a user