kpsul/gestion/migrations/0001_initial.py
Martin Pépin 9f401b66e9 Specify the on_delete attribute everywhere
- Models
- Migrations
2017-02-23 01:40:25 +01:00

34 lines
1.5 KiB
Python

# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Profile',
fields=[
('id', models.AutoField(auto_created=True, verbose_name='ID', serialize=False, primary_key=True)),
('login_clipper', models.CharField(verbose_name='Login clipper', max_length=8, blank=True)),
('phone', models.CharField(verbose_name='Téléphone', max_length=20, blank=True)),
('occupation', models.CharField(choices=[('exterieur', 'Extérieur'), ('1A', '1A'), ('2A', '2A'), ('3A', '3A'), ('4A', '4A'), ('archicube', 'Archicube'), ('doctorant', 'Doctorant'), ('CST', 'CST')], verbose_name='Occupation', max_length=9, default='1A')),
('departement', models.CharField(verbose_name='Département', max_length=50, blank=True)),
('comments', models.TextField(verbose_name="Commentaires visibles par l'utilisateur", blank=True)),
('user', models.OneToOneField(
on_delete=models.CASCADE,
to=settings.AUTH_USER_MODEL,
related_name='profile')),
],
options={
'verbose_name': 'Profil',
'verbose_name_plural': 'Profils',
},
),
]