mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2026-01-01 22:07:03 -05:00
feat: Implement initial schema and add various API, service, and management command enhancements across the application.
This commit is contained in:
@@ -31,9 +31,7 @@ class PhotoUploadInputSerializer(serializers.Serializer):
|
||||
allow_blank=True,
|
||||
help_text="Alt text for accessibility",
|
||||
)
|
||||
is_primary = serializers.BooleanField(
|
||||
default=False, help_text="Whether this should be the primary photo"
|
||||
)
|
||||
is_primary = serializers.BooleanField(default=False, help_text="Whether this should be the primary photo")
|
||||
|
||||
|
||||
@extend_schema_serializer(
|
||||
@@ -89,9 +87,7 @@ class PhotoDetailOutputSerializer(serializers.Serializer):
|
||||
return {
|
||||
"id": obj.uploaded_by.id,
|
||||
"username": obj.uploaded_by.username,
|
||||
"display_name": getattr(
|
||||
obj.uploaded_by, "get_display_name", lambda: obj.uploaded_by.username
|
||||
)(),
|
||||
"display_name": getattr(obj.uploaded_by, "get_display_name", lambda: obj.uploaded_by.username)(),
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user