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:
@ -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',
|
||||
|
Reference in New Issue
Block a user