forked from DGNum/gestioCOF
76 lines
3.8 KiB
Python
76 lines
3.8 KiB
Python
|
# -*- coding: utf-8 -*-
|
||
|
from __future__ import unicode_literals
|
||
|
|
||
|
from django.db import migrations, models
|
||
|
import modelcluster.fields
|
||
|
import wagtail.wagtailcore.fields
|
||
|
import django.db.models.deletion
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
dependencies = [
|
||
|
('wagtailcore', '0033_remove_golive_expiry_help_text'),
|
||
|
('wagtailimages', '0019_delete_filter'),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.CreateModel(
|
||
|
name='GroupTeam',
|
||
|
fields=[
|
||
|
('id', models.AutoField(primary_key=True, verbose_name='ID', auto_created=True, serialize=False)),
|
||
|
('name', models.CharField(max_length=255, verbose_name='Nom')),
|
||
|
],
|
||
|
options={
|
||
|
'verbose_name': 'Groupe de K-Fêt-eux-ses',
|
||
|
'verbose_name_plural': 'Groupes de K-Fêt-eux-ses',
|
||
|
},
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='KFetPage',
|
||
|
fields=[
|
||
|
('page_ptr', models.OneToOneField(primary_key=True, to='wagtailcore.Page', parent_link=True, auto_created=True, serialize=False)),
|
||
|
('no_header', models.BooleanField(verbose_name='Sans en-tête', help_text="Coché, l'en-tête (avec le titre) de la page n'est pas affiché.", default=False)),
|
||
|
('content', wagtail.wagtailcore.fields.RichTextField(verbose_name='Contenu')),
|
||
|
('custom_template', models.CharField(max_length=255, verbose_name='Template personnalisé', blank=True)),
|
||
|
],
|
||
|
options={
|
||
|
'verbose_name': 'page K-Fêt',
|
||
|
'verbose_name_plural': 'pages K-Fêt',
|
||
|
},
|
||
|
bases=('wagtailcore.page',),
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='KFetPageGroupTeam',
|
||
|
fields=[
|
||
|
('id', models.AutoField(primary_key=True, verbose_name='ID', auto_created=True, serialize=False)),
|
||
|
('sort_order', models.IntegerField(editable=False, null=True, blank=True)),
|
||
|
('title', models.CharField(max_length=255, verbose_name='Titre du groupe', blank=True)),
|
||
|
('content', wagtail.wagtailcore.fields.RichTextField(verbose_name='Texte de présentation du groupe')),
|
||
|
('group', models.ForeignKey(related_name='+', verbose_name='Groupe de K-Fêt-eux-ses', to='kfetcms.GroupTeam')),
|
||
|
('page', modelcluster.fields.ParentalKey(related_name='team_groups', to='kfetcms.KFetPage')),
|
||
|
('show_only', models.IntegerField(default=None, verbose_name='Montrer seulement', blank=True, null=True, help_text='Nombre de membres du groupe affichés initialement. Laisser vide pour tou-te-s les afficher.')),
|
||
|
|
||
|
],
|
||
|
options={
|
||
|
'abstract': False,
|
||
|
'ordering': ['sort_order'],
|
||
|
},
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='MemberTeam',
|
||
|
fields=[
|
||
|
('id', models.AutoField(primary_key=True, verbose_name='ID', auto_created=True, serialize=False)),
|
||
|
('sort_order', models.IntegerField(editable=False, null=True, blank=True)),
|
||
|
('first_name', models.CharField(max_length=255, verbose_name='Prénom', blank=True, default='')),
|
||
|
('last_name', models.CharField(max_length=255, verbose_name='Nom', blank=True, default='')),
|
||
|
('nick_name', models.CharField(max_length=255, verbose_name='Alias', blank=True, default='')),
|
||
|
('group', modelcluster.fields.ParentalKey(related_name='members', verbose_name='Groupe de K-Fêt-eux-ses', to='kfetcms.GroupTeam')),
|
||
|
('photo', models.ForeignKey(related_name='+', on_delete=django.db.models.deletion.SET_NULL, blank=True, verbose_name='Photo', to='wagtailimages.Image', null=True)),
|
||
|
],
|
||
|
options={
|
||
|
'verbose_name': 'K-Fêt-eux-se',
|
||
|
},
|
||
|
),
|
||
|
]
|