Remove ajax_select from sas

This commit is contained in:
2024-10-21 10:30:35 +02:00
parent 8b419dcee6
commit afdc6b69df
5 changed files with 95 additions and 21 deletions

View File

@ -1,11 +1,24 @@
from datetime import datetime
from pathlib import Path
from django.urls import reverse
from ninja import FilterSchema, ModelSchema, Schema
from pydantic import Field, NonNegativeInt
from core.schemas import SimpleUserSchema, UserProfileSchema
from sas.models import Picture, PictureModerationRequest
from sas.models import Album, Picture, PictureModerationRequest
class AlbumSchema(ModelSchema):
class Meta:
model = Album
fields = ["id", "name"]
path: str
@staticmethod
def resolve_path(obj: Album) -> str:
return str(Path(obj.get_parent_path()) / obj.name)
class PictureFilterSchema(FilterSchema):