format
This commit is contained in:
@@ -44,15 +44,15 @@ class Album(models.Model):
|
|||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.title
|
return self.title
|
||||||
|
|
||||||
def get_absolute_url(self):
|
|
||||||
return reverse("gallery:album", kwargs={"slug": self.slug})
|
|
||||||
|
|
||||||
def save(self, *args, **kwargs):
|
def save(self, *args, **kwargs):
|
||||||
if not self.slug:
|
if not self.slug:
|
||||||
self.slug = slugify(self.title)
|
self.slug = slugify(self.title)
|
||||||
|
|
||||||
super().save(*args, **kwargs)
|
super().save(*args, **kwargs)
|
||||||
|
|
||||||
|
def get_absolute_url(self):
|
||||||
|
return reverse("gallery:album", kwargs={"slug": self.slug})
|
||||||
|
|
||||||
def get_images(self):
|
def get_images(self):
|
||||||
return get_image_list(self.folder_name)
|
return get_image_list(self.folder_name)
|
||||||
|
|
||||||
|
|||||||
@@ -170,11 +170,10 @@ class Etherpad(models.Model):
|
|||||||
params={"length": len(pad_name), "pad_name": pad_name},
|
params={"length": len(pad_name), "pad_name": pad_name},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if self.etherpad_key is None:
|
||||||
self.etherpad_key = create_pad(pad_name)
|
self.etherpad_key = create_pad(pad_name)
|
||||||
if not self.etherpad_key:
|
if self.etherpad_key is None:
|
||||||
raise ValidationError(
|
raise ValidationError(f"Etherpad '{pad_name}' konnte nicht erstellt werden.")
|
||||||
_(f"Etherpad '{pad_name}' konnte nicht erstellt werden."),
|
|
||||||
)
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def etherpad_html(self):
|
def etherpad_html(self):
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
x-transition:leave-start="scale-100 opacity-90"
|
x-transition:leave-start="scale-100 opacity-90"
|
||||||
x-transition:leave-end="scale-0 opacity-0"
|
x-transition:leave-end="scale-0 opacity-0"
|
||||||
>
|
>
|
||||||
<input class="flex-grow bg-inherit text-inherit h-10 p-0 border-0 focus:outline-none focus:border-transparent focus:ring-0" type="search" name="q" placeholder="Nach Person, Artikel oder Fotoalbum suchen...">
|
<input class="flex-grow bg-inherit text-inherit h-10 p-0 border-0 focus:outline-none focus:border-transparent focus:ring-0" type="search" name="q" placeholder="Nach Person, Artikel oder Fotoalbum suchen..." autofocus>
|
||||||
<button type="submit" class="flex-none">
|
<button type="submit" class="flex-none">
|
||||||
<i class="fa-solid fa-magnifying-glass text-gray-500 dark:text-gray-600"></i>
|
<i class="fa-solid fa-magnifying-glass text-gray-500 dark:text-gray-600"></i>
|
||||||
</button>
|
</button>
|
||||||
@@ -212,7 +212,8 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<hr class="legal-divider">
|
<hr class="legal-divider">
|
||||||
<p class="copyright">© {% now 'Y' %} FET - Alle Rechte vorbehalten. {% version %}.</p>
|
<p class="copyright">© {% now 'Y' %} FET - Alle Rechte vorbehalten.</p>
|
||||||
|
<p class="text-center">{% version %}.</p>
|
||||||
</footer>
|
</footer>
|
||||||
<div class="super-duper-awesome-signature" x-data="counter">
|
<div class="super-duper-awesome-signature" x-data="counter">
|
||||||
<span x-ref="countFour">Handcrafted </span>
|
<span x-ref="countFour">Handcrafted </span>
|
||||||
|
|||||||
Reference in New Issue
Block a user