mirror of
https://gitlab.crans.org/mediatek/med.git
synced 2025-07-08 03:30:20 +02:00
Give ISBN to each borrowable object, even if it does not have one
This commit is contained in:
@ -32,6 +32,14 @@ class Author(models.Model):
|
||||
|
||||
|
||||
class Borrowable(PolymorphicModel):
|
||||
isbn = ISBNField(
|
||||
_('ISBN'),
|
||||
help_text=_('You may be able to scan it from a bar code.'),
|
||||
unique=True,
|
||||
blank=True,
|
||||
null=True,
|
||||
)
|
||||
|
||||
title = models.CharField(
|
||||
max_length=255,
|
||||
verbose_name=_("title"),
|
||||
@ -83,14 +91,6 @@ class Medium(Borrowable):
|
||||
|
||||
|
||||
class Book(Medium):
|
||||
isbn = ISBNField(
|
||||
_('ISBN'),
|
||||
help_text=_('You may be able to scan it from a bar code.'),
|
||||
unique=True,
|
||||
blank=True,
|
||||
null=True,
|
||||
)
|
||||
|
||||
subtitle = models.CharField(
|
||||
verbose_name=_('subtitle'),
|
||||
max_length=255,
|
||||
|
Reference in New Issue
Block a user