API route to fetch news dates

This commit is contained in:
imperosol committed 2025-02-25 08:55:35 +01:00
1 parent fc3b82c35c
commit 86c2ea7fd9
4 files changed
+165 -7

No files matched your search

+14
View File
@@ -7,3 +7,17 @@ class ClubSchema(ModelSchema):
class Meta:
model = Club
fields = ["id", "name"]
class ClubProfileSchema(ModelSchema):
"""The infos needed to display a simple club profile."""
class Meta:
model = Club
fields = ["id", "name", "logo"]
url: str
@staticmethod
def resolve_url(obj: Club) -> str:
return obj.get_absolute_url()