random all commit

This commit is contained in:
2024-05-10 13:54:16 +02:00
parent ba7e229ab2
commit e2e3a77fd9
6 changed files with 220 additions and 42 deletions

View File

@@ -10,6 +10,7 @@ from django.contrib.auth.models import Group
from django.contrib.auth.models import AbstractUser
from fellchensammlung.tools import misc
from notfellchen.settings import MEDIA_URL
class Language(models.Model):
@@ -41,6 +42,10 @@ class Image(models.Model):
def __str__(self):
return self.title
@property
def as_html(self):
return f'<img src="{ MEDIA_URL }/{ self.image }" alt="{ self.alt_text }">'
class Species(models.Model):
"""Model representing a species of animal."""