mirror of
https://gitlab.crans.org/mediatek/med.git
synced 2024-12-24 17:42:23 +00:00
ISBN is unique
This commit is contained in:
parent
ef710bf964
commit
53ea1288c1
20
media/migrations/0026_auto_20200210_1740.py
Normal file
20
media/migrations/0026_auto_20200210_1740.py
Normal file
@ -0,0 +1,20 @@
|
||||
# Generated by Django 2.2.4 on 2020-02-10 16:40
|
||||
|
||||
from django.db import migrations
|
||||
import media.fields
|
||||
import media.validators
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('media', '0025_auteur_note'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='media',
|
||||
name='isbn',
|
||||
field=media.fields.ISBNField(blank=True, help_text='You may be able to scan it from a bar code.', max_length=28, null=True, unique=True, validators=[media.validators.isbn_validator], verbose_name='ISBN'),
|
||||
),
|
||||
]
|
@ -34,6 +34,7 @@ class Media(models.Model):
|
||||
isbn = ISBNField(
|
||||
_('ISBN'),
|
||||
help_text=_('You may be able to scan it from a bar code.'),
|
||||
unique=True,
|
||||
blank=True,
|
||||
null=True,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user