API route to fetch news dates

This commit is contained in:
imperosol
2025-02-17 13:29:12 +01:00
parent fc3b82c35c
commit 86c2ea7fd9
4 changed files with 165 additions and 7 deletions

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()