fields made optional
This commit is contained in:
parent
72a182fdcb
commit
f4e86ee849
2 changed files with 21 additions and 15 deletions
|
@ -1,4 +1,4 @@
|
||||||
# Generated by Django 2.2b1 on 2019-02-18 20:46
|
# Generated by Django 2.2b1 on 2019-02-18 21:05
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
import django.core.validators
|
import django.core.validators
|
||||||
|
@ -27,14 +27,14 @@ class Migration(migrations.Migration):
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
('full_name', models.CharField(max_length=1023, verbose_name='nom')),
|
('full_name', models.CharField(max_length=1023, verbose_name='nom')),
|
||||||
('nickname', models.CharField(max_length=1023, verbose_name='surnom')),
|
('nickname', models.CharField(blank=True, max_length=1023, verbose_name='surnom')),
|
||||||
('picture', models.ImageField(upload_to='picture', verbose_name='photo')),
|
('picture', models.ImageField(blank=True, upload_to='picture', verbose_name='photo')),
|
||||||
('promotion', models.IntegerField(validators=[django.core.validators.MinValueValidator(1980)], verbose_name='promotion')),
|
('promotion', models.IntegerField(validators=[django.core.validators.MinValueValidator(1980)], verbose_name='promotion')),
|
||||||
('birth_date', models.DateField(verbose_name='date de naissance')),
|
('birth_date', models.DateField(blank=True, verbose_name='date de naissance')),
|
||||||
('thurne', models.CharField(max_length=100, verbose_name='thurne')),
|
('thurne', models.CharField(blank=True, max_length=100, verbose_name='thurne')),
|
||||||
('text_field', models.TextField(verbose_name='champ libre')),
|
('text_field', models.TextField(blank=True, verbose_name='champ libre')),
|
||||||
('printing', models.BooleanField(verbose_name="apparaître sur l'annuaire papier ?")),
|
('printing', models.BooleanField(default=False, verbose_name="apparaître sur l'annuaire papier ?")),
|
||||||
('keep_me', models.BooleanField(verbose_name='conserver la fiche annuaire ?')),
|
('keep_me', models.BooleanField(default=False, verbose_name='conserver la fiche annuaire ?')),
|
||||||
('department', models.ManyToManyField(to='fiches.Department', verbose_name='département')),
|
('department', models.ManyToManyField(to='fiches.Department', verbose_name='département')),
|
||||||
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='utilisateur')),
|
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='utilisateur')),
|
||||||
],
|
],
|
||||||
|
|
|
@ -9,17 +9,23 @@ class Profile(models.Model):
|
||||||
User, on_delete=models.CASCADE, verbose_name=_("utilisateur")
|
User, on_delete=models.CASCADE, verbose_name=_("utilisateur")
|
||||||
)
|
)
|
||||||
full_name = models.CharField(max_length=1023, verbose_name=_("nom"))
|
full_name = models.CharField(max_length=1023, verbose_name=_("nom"))
|
||||||
nickname = models.CharField(max_length=1023, verbose_name=_("surnom"))
|
nickname = models.CharField(blank=True, max_length=1023, verbose_name=_("surnom"))
|
||||||
picture = models.ImageField(upload_to="picture", verbose_name=_("photo"))
|
picture = models.ImageField(
|
||||||
|
blank=True, upload_to="picture", verbose_name=_("photo")
|
||||||
|
)
|
||||||
department = models.ManyToManyField("Department", verbose_name=_("département"))
|
department = models.ManyToManyField("Department", verbose_name=_("département"))
|
||||||
promotion = models.IntegerField(
|
promotion = models.IntegerField(
|
||||||
validators=[MinValueValidator(1980)], verbose_name=_("promotion")
|
validators=[MinValueValidator(1980)], verbose_name=_("promotion")
|
||||||
)
|
)
|
||||||
birth_date = models.DateField(verbose_name=_("date de naissance"))
|
birth_date = models.DateField(blank=True, verbose_name=_("date de naissance"))
|
||||||
thurne = models.CharField(max_length=100, verbose_name=_("thurne"))
|
thurne = models.CharField(blank=True, max_length=100, verbose_name=_("thurne"))
|
||||||
text_field = models.TextField(verbose_name=_("champ libre"))
|
text_field = models.TextField(blank=True, verbose_name=_("champ libre"))
|
||||||
printing = models.BooleanField(verbose_name=_("apparaître sur l'annuaire papier ?"))
|
printing = models.BooleanField(
|
||||||
keep_me = models.BooleanField(verbose_name=_("conserver la fiche annuaire ?"))
|
default=False, verbose_name=_("apparaître sur l'annuaire papier ?")
|
||||||
|
)
|
||||||
|
keep_me = models.BooleanField(
|
||||||
|
default=False, verbose_name=_("conserver la fiche annuaire ?")
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class Department(models.Model):
|
class Department(models.Model):
|
||||||
|
|
Loading…
Reference in a new issue