1
0
mirror of https://gitlab.crans.org/mediatek/med.git synced 2025-07-06 21:34:01 +02:00

Add a model to store future media list.

This commit is contained in:
Yohann D'ANELLO
2020-05-12 17:33:32 +02:00
parent adbaf66401
commit ea30cdec6e
3 changed files with 36 additions and 4 deletions

View File

@ -84,6 +84,23 @@ class Media(models.Model):
ordering = ['title', 'subtitle']
class FutureMedia(models.Model):
isbn = ISBNField(
_('ISBN'),
help_text=_('You may be able to scan it from a bar code.'),
unique=True,
blank=True,
null=True,
)
class Meta:
verbose_name = _("future medium")
verbose_name_plural = _("future media")
def __str__(self):
return "Future medium (ISBN: {isbn})".format(isbn=self.isbn, )
class Emprunt(models.Model):
media = models.ForeignKey(
'Media',