forked from DGNum/gestioCOF
8c6d56b27c
K-Fêt - Integrate wagtail to serve "static" pages of old K-Fêt website - Fixture "kfetcms/kfet_wagtail_17_05" contains a copy of old website (as in May 2017). - Media files can be got until end of June 17 at http://partage.eleves.ens.fr//files/604e6dea2ceebc66b1936c6b3f911744/kfet_media.tar.gz Login/logout - Update package django_cas_ng to last version. - Clean COFCASBackend. - Change CAS version to 3 (version used on eleves.ens). This enables the logout redirection (for CAS ofc). - Add messages and clean existing ones on login/logout (for both outsider and cas users). Misc - Update settings to bypass an incompability between debug-toolbar and wagtailmenus packages. - Better management of dev/test-specific urls (if debug-toolbar wasn't in INSTALLED_APPS, media files were not served). - UI improvements.
75 lines
3.8 KiB
Python
75 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',
|
|
},
|
|
),
|
|
]
|