Use Alpine and the API for SAS picture upload

This commit is contained in:
imperosol
2025-03-29 18:19:58 +01:00
committed by Thomas Girod
parent b83fbf91e1
commit 13f417ba30
6 changed files with 52 additions and 152 deletions

View File

@ -134,7 +134,6 @@ class Picture(SasFile):
self.thumbnail.name = new_extension_name
self.compressed = compressed
self.compressed.name = new_extension_name
self.save()
def rotate(self, degree):
for attr in ["file", "compressed", "thumbnail"]:
@ -235,6 +234,8 @@ class Album(SasFile):
return Album.objects.filter(parent=self)
def get_absolute_url(self):
if self.id == settings.SITH_SAS_ROOT_DIR_ID:
return reverse("sas:main")
return reverse("sas:album", kwargs={"album_id": self.id})
def get_download_url(self):