Internal
Public Access
Initial commit: KeepItGoing task management server
Features: - Django-based REST API with web interface - Task management with tags, priorities, and due dates - Time tracking with start/stop timers - Subtasks support - Task filtering (all, today, upcoming, overdue, completed) - Tag-based organization with color coding - Sorting by due date and priority - Auto-assign tags when filtering - Responsive 3-pane layout (sidebar, task list, detail panel) - Task sharing between users - Mobile-responsive design with dark mode support 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
"""
|
||||
Notification serializers for KeepItGoing API.
|
||||
"""
|
||||
|
||||
from rest_framework import serializers
|
||||
from .models import Notification, ScheduledReminder
|
||||
|
||||
|
||||
class NotificationSerializer(serializers.ModelSerializer):
|
||||
"""Serializer for notifications."""
|
||||
|
||||
task_title = serializers.CharField(source='task.title', read_only=True)
|
||||
|
||||
class Meta:
|
||||
model = Notification
|
||||
fields = [
|
||||
'id', 'notification_type', 'title', 'message', 'task',
|
||||
'task_title', 'is_read', 'read_at', 'created_at'
|
||||
]
|
||||
read_only_fields = ['id', 'created_at']
|
||||
|
||||
|
||||
class ScheduledReminderSerializer(serializers.ModelSerializer):
|
||||
"""Serializer for scheduled reminders."""
|
||||
|
||||
class Meta:
|
||||
model = ScheduledReminder
|
||||
fields = ['id', 'task', 'remind_at', 'is_sent', 'sent_at', 'created_at']
|
||||
read_only_fields = ['id', 'is_sent', 'sent_at', 'created_at']
|
||||
Reference in New Issue
Block a user