annuaire-eleves/fiches/migrations/0001_initial.py

61 lines
3.1 KiB
Python
Raw Normal View History

2019-02-18 22:03:38 +01:00
# Generated by Django 2.2b1 on 2019-02-18 21:05
2019-02-11 23:51:38 +01:00
from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Department',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
2019-02-18 21:52:07 +01:00
('name', models.CharField(max_length=1023, verbose_name='nom du département')),
2019-02-11 23:51:38 +01:00
],
),
migrations.CreateModel(
name='Profile',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('full_name', models.CharField(max_length=1023, verbose_name='nom')),
2019-02-18 22:03:38 +01:00
('nickname', models.CharField(blank=True, max_length=1023, verbose_name='surnom')),
('picture', models.ImageField(blank=True, upload_to='picture', verbose_name='photo')),
2019-02-11 23:51:38 +01:00
('promotion', models.IntegerField(validators=[django.core.validators.MinValueValidator(1980)], verbose_name='promotion')),
2019-02-18 22:03:38 +01:00
('birth_date', models.DateField(blank=True, verbose_name='date de naissance')),
('thurne', models.CharField(blank=True, max_length=100, verbose_name='thurne')),
('text_field', models.TextField(blank=True, verbose_name='champ libre')),
('printing', models.BooleanField(default=False, verbose_name="apparaître sur l'annuaire papier ?")),
('keep_me', models.BooleanField(default=False, verbose_name='conserver la fiche annuaire ?')),
2019-02-11 23:51:38 +01:00
('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')),
],
),
2019-02-18 21:52:07 +01:00
migrations.CreateModel(
name='Social',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=1023, verbose_name='type')),
('content', models.CharField(max_length=1023, verbose_name='contenu')),
('profile', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='fiches.Profile', verbose_name='profil')),
],
),
migrations.CreateModel(
name='Phone',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=1023, verbose_name='type')),
('number', models.CharField(max_length=1023, verbose_name='numéro')),
('profile', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='fiches.Profile', verbose_name='profil')),
],
),
2019-02-11 23:51:38 +01:00
]