forked from DGNum/gestioCOF
b0b0542407
- Deprecation warnings using Django 1.8 are resolved. - Deprecation warnings using Django 1.11 are resolved. - Admin: grappelli is no longer used. - Upgrade to django-autocomplete-light v3 (v2 is not 1.11 compatible). * autocomplete.modelform_factory being dropped, code uses dal Select2 views and widgets.
49 lines
3.8 KiB
Python
49 lines
3.8 KiB
Python
# -*- coding: utf-8 -*-
|
|
from __future__ import unicode_literals
|
|
|
|
from django.db import migrations, models
|
|
import wagtail.wagtailsnippets.blocks
|
|
import wagtail.wagtailcore.blocks
|
|
import wagtail.wagtailcore.fields
|
|
import django.db.models.deletion
|
|
import kfet.cms.models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('wagtailcore', '0033_remove_golive_expiry_help_text'),
|
|
('wagtailimages', '0019_delete_filter'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='KFetPage',
|
|
fields=[
|
|
('page_ptr', models.OneToOneField(serialize=False, primary_key=True, parent_link=True, auto_created=True, to='wagtailcore.Page', on_delete=models.CASCADE)),
|
|
('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.StreamField((('rich', wagtail.wagtailcore.blocks.RichTextBlock(label='Éditeur')), ('carte', kfet.cms.models.MenuBlock()), ('group_team', wagtail.wagtailcore.blocks.StructBlock((('show_only', wagtail.wagtailcore.blocks.IntegerBlock(help_text='Nombre initial de membres affichés. Laisser vide pour tou-te-s les afficher.', required=False, label='Montrer seulement')), ('members', wagtail.wagtailcore.blocks.ListBlock(wagtail.wagtailsnippets.blocks.SnippetChooserBlock(kfet.cms.models.MemberTeam), classname='team-group', label='K-Fêt-eux-ses'))))), ('group', wagtail.wagtailcore.blocks.StreamBlock((('rich', wagtail.wagtailcore.blocks.RichTextBlock(label='Éditeur')), ('carte', kfet.cms.models.MenuBlock()), ('group_team', wagtail.wagtailcore.blocks.StructBlock((('show_only', wagtail.wagtailcore.blocks.IntegerBlock(help_text='Nombre initial de membres affichés. Laisser vide pour tou-te-s les afficher.', required=False, label='Montrer seulement')), ('members', wagtail.wagtailcore.blocks.ListBlock(wagtail.wagtailsnippets.blocks.SnippetChooserBlock(kfet.cms.models.MemberTeam), classname='team-group', label='K-Fêt-eux-ses')))))), label='Contenu groupé'))), verbose_name='Contenu')),
|
|
('layout', models.CharField(max_length=255, choices=[('kfet/base_col_1.html', 'Une colonne : centrée sur la page'), ('kfet/base_col_2.html', 'Deux colonnes : fixe à gauche, contenu à droite'), ('kfet/base_col_mult.html', 'Contenu scindé sur plusieurs colonnes')], help_text='Comment cette page devrait être affichée ?', verbose_name='Template', default='kfet/base_col_mult.html')),
|
|
('main_size', models.CharField(max_length=255, blank=True, verbose_name='Taille de la colonne de contenu')),
|
|
('col_count', models.CharField(max_length=255, blank=True, verbose_name='Nombre de colonnes', help_text="S'applique au page dont le contenu est scindé sur plusieurs colonnes")),
|
|
],
|
|
options={
|
|
'verbose_name': 'page K-Fêt',
|
|
'verbose_name_plural': 'pages K-Fêt',
|
|
},
|
|
bases=('wagtailcore.page',),
|
|
),
|
|
migrations.CreateModel(
|
|
name='MemberTeam',
|
|
fields=[
|
|
('id', models.AutoField(verbose_name='ID', auto_created=True, serialize=False, primary_key=True)),
|
|
('first_name', models.CharField(blank=True, max_length=255, verbose_name='Prénom', default='')),
|
|
('last_name', models.CharField(blank=True, max_length=255, verbose_name='Nom', default='')),
|
|
('nick_name', models.CharField(verbose_name='Alias', blank=True, default='', max_length=255)),
|
|
('photo', models.ForeignKey(null=True, related_name='+', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Photo', blank=True, to='wagtailimages.Image')),
|
|
],
|
|
options={
|
|
'verbose_name': 'K-Fêt-eux-se',
|
|
},
|
|
),
|
|
]
|