mirror of
https://gitlab.crans.org/mediatek/med.git
synced 2025-07-05 20:43:56 +02:00
Add shortcut and order
This commit is contained in:
@ -18,6 +18,7 @@ class Auteur(models.Model):
|
||||
class Meta:
|
||||
verbose_name = _("author")
|
||||
verbose_name_plural = _("authors")
|
||||
ordering = ['nom']
|
||||
|
||||
|
||||
class Media(models.Model):
|
||||
@ -62,11 +63,13 @@ class Media(models.Model):
|
||||
)
|
||||
|
||||
def __str__(self):
|
||||
return str(self.title) + ' - ' + str(self.authors.all().first())
|
||||
return str(self.title) + ' - ' + str(self.subtitle) \
|
||||
+ ' - ' + str(self.authors.all().first())
|
||||
|
||||
class Meta:
|
||||
verbose_name = _("medium")
|
||||
verbose_name_plural = _("media")
|
||||
ordering = ['title', 'subtitle']
|
||||
|
||||
|
||||
class Emprunt(models.Model):
|
||||
@ -97,6 +100,7 @@ class Emprunt(models.Model):
|
||||
class Meta:
|
||||
verbose_name = _("borrowed item")
|
||||
verbose_name_plural = _("borrowed items")
|
||||
ordering = ['-date_emprunt']
|
||||
|
||||
|
||||
class Jeu(models.Model):
|
||||
@ -122,3 +126,4 @@ class Jeu(models.Model):
|
||||
class Meta:
|
||||
verbose_name = _("game")
|
||||
verbose_name_plural = _("games")
|
||||
ordering = ['nom']
|
||||
|
Reference in New Issue
Block a user