Improve help text for ISBN
This commit is contained in:
parent
1dab5e1c8a
commit
ee8f7807b4
2 changed files with 26 additions and 1 deletions
19
manuels/migrations/0012_auto_20180524_0014.py
Normal file
19
manuels/migrations/0012_auto_20180524_0014.py
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# Generated by Django 2.0.5 on 2018-05-23 22:14
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import manuels.models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('manuels', '0011_auto_20180524_0013'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='book',
|
||||||
|
name='isbn',
|
||||||
|
field=models.CharField(help_text='Format attendu : 10 ou 13 chiffres, éventuellement séparés par des tirets et éventuellement suivis de la lettre <code>X</code>', max_length=20, validators=[manuels.models.isbn_validator], verbose_name='ISBN/EAN'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -114,7 +114,13 @@ class Book(BaseModel):
|
||||||
authors = models.TextField('auteurs')
|
authors = models.TextField('auteurs')
|
||||||
editor = models.ForeignKey(verbose_name='éditeur', to=Editor, on_delete=models.PROTECT, null=True)
|
editor = models.ForeignKey(verbose_name='éditeur', to=Editor, on_delete=models.PROTECT, null=True)
|
||||||
publication_year = models.PositiveIntegerField('année de publication')
|
publication_year = models.PositiveIntegerField('année de publication')
|
||||||
isbn = models.CharField('ISBN/EAN', max_length=20, validators=[isbn_validator])
|
isbn = models.CharField(
|
||||||
|
'ISBN/EAN',
|
||||||
|
max_length=20,
|
||||||
|
help_text="Format attendu : 10 ou 13 chiffres, éventuellement séparés par des tirets et éventuellement "
|
||||||
|
"suivis de la lettre <code>X</code>",
|
||||||
|
validators=[isbn_validator]
|
||||||
|
)
|
||||||
price = models.PositiveIntegerField('prix')
|
price = models.PositiveIntegerField('prix')
|
||||||
YES_NO_CHOICE = (
|
YES_NO_CHOICE = (
|
||||||
(False, 'Non'),
|
(False, 'Non'),
|
||||||
|
|
Loading…
Reference in a new issue