forked from DGNum/gestioCOF
Models des pages et traductions
This commit is contained in:
parent
65d7a66eb8
commit
6023211ab0
5 changed files with 296 additions and 18 deletions
|
@ -2,33 +2,170 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import wagtail.wagtailimages.blocks
|
||||
import wagtail.wagtailcore.blocks
|
||||
import wagtail.wagtailcore.fields
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('wagtailimages', '0019_delete_filter'),
|
||||
('wagtailcore', '0033_remove_golive_expiry_help_text'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='COFActuIndexPage',
|
||||
fields=[
|
||||
('page_ptr', models.OneToOneField(primary_key=True, parent_link=True, serialize=False, auto_created=True, to='wagtailcore.Page')),
|
||||
('title_fr', models.CharField(null=True, verbose_name='title', help_text="The page title as you'd like it to be seen by the public", max_length=255)),
|
||||
('title_en', models.CharField(null=True, verbose_name='title', help_text="The page title as you'd like it to be seen by the public", max_length=255)),
|
||||
('slug_fr', models.SlugField(null=True, verbose_name='slug', help_text='The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/', max_length=255)),
|
||||
('slug_en', models.SlugField(null=True, verbose_name='slug', help_text='The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/', max_length=255)),
|
||||
('url_path_fr', models.TextField(null=True, blank=True, verbose_name='URL path', editable=False)),
|
||||
('url_path_en', models.TextField(null=True, blank=True, verbose_name='URL path', editable=False)),
|
||||
('seo_title_fr', models.CharField(null=True, blank=True, verbose_name='page title', help_text="Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.", max_length=255)),
|
||||
('seo_title_en', models.CharField(null=True, blank=True, verbose_name='page title', help_text="Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.", max_length=255)),
|
||||
('search_description_fr', models.TextField(null=True, blank=True, verbose_name='search description')),
|
||||
('search_description_en', models.TextField(null=True, blank=True, verbose_name='search description')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=('wagtailcore.page',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='COFActuPage',
|
||||
fields=[
|
||||
('page_ptr', models.OneToOneField(primary_key=True, parent_link=True, serialize=False, auto_created=True, to='wagtailcore.Page')),
|
||||
('title_fr', models.CharField(null=True, verbose_name='title', help_text="The page title as you'd like it to be seen by the public", max_length=255)),
|
||||
('title_en', models.CharField(null=True, verbose_name='title', help_text="The page title as you'd like it to be seen by the public", max_length=255)),
|
||||
('slug_fr', models.SlugField(null=True, verbose_name='slug', help_text='The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/', max_length=255)),
|
||||
('slug_en', models.SlugField(null=True, verbose_name='slug', help_text='The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/', max_length=255)),
|
||||
('url_path_fr', models.TextField(null=True, blank=True, verbose_name='URL path', editable=False)),
|
||||
('url_path_en', models.TextField(null=True, blank=True, verbose_name='URL path', editable=False)),
|
||||
('seo_title_fr', models.CharField(null=True, blank=True, verbose_name='page title', help_text="Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.", max_length=255)),
|
||||
('seo_title_en', models.CharField(null=True, blank=True, verbose_name='page title', help_text="Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.", max_length=255)),
|
||||
('search_description_fr', models.TextField(null=True, blank=True, verbose_name='search description')),
|
||||
('search_description_en', models.TextField(null=True, blank=True, verbose_name='search description')),
|
||||
('body', wagtail.wagtailcore.fields.RichTextField(verbose_name='Contenu')),
|
||||
('body_fr', wagtail.wagtailcore.fields.RichTextField(null=True, verbose_name='Contenu')),
|
||||
('body_en', wagtail.wagtailcore.fields.RichTextField(null=True, verbose_name='Contenu')),
|
||||
('date', models.DateField(verbose_name='Date du post')),
|
||||
('Image à la Une', models.ForeignKey(null=True, to='wagtailimages.Image', on_delete=django.db.models.deletion.SET_NULL, blank=True, related_name='+')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=('wagtailcore.page',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='COFDirectoryEntryPage',
|
||||
fields=[
|
||||
('page_ptr', models.OneToOneField(primary_key=True, parent_link=True, serialize=False, auto_created=True, to='wagtailcore.Page')),
|
||||
('title_fr', models.CharField(null=True, verbose_name='title', help_text="The page title as you'd like it to be seen by the public", max_length=255)),
|
||||
('title_en', models.CharField(null=True, verbose_name='title', help_text="The page title as you'd like it to be seen by the public", max_length=255)),
|
||||
('slug_fr', models.SlugField(null=True, verbose_name='slug', help_text='The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/', max_length=255)),
|
||||
('slug_en', models.SlugField(null=True, verbose_name='slug', help_text='The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/', max_length=255)),
|
||||
('url_path_fr', models.TextField(null=True, blank=True, verbose_name='URL path', editable=False)),
|
||||
('url_path_en', models.TextField(null=True, blank=True, verbose_name='URL path', editable=False)),
|
||||
('seo_title_fr', models.CharField(null=True, blank=True, verbose_name='page title', help_text="Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.", max_length=255)),
|
||||
('seo_title_en', models.CharField(null=True, blank=True, verbose_name='page title', help_text="Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.", max_length=255)),
|
||||
('search_description_fr', models.TextField(null=True, blank=True, verbose_name='search description')),
|
||||
('search_description_en', models.TextField(null=True, blank=True, verbose_name='search description')),
|
||||
('body', wagtail.wagtailcore.fields.RichTextField(verbose_name='Description')),
|
||||
('body_fr', wagtail.wagtailcore.fields.RichTextField(null=True, verbose_name='Description')),
|
||||
('body_en', wagtail.wagtailcore.fields.RichTextField(null=True, verbose_name='Description')),
|
||||
('links', wagtail.wagtailcore.fields.StreamField((('lien', wagtail.wagtailcore.blocks.StructBlock((('url', wagtail.wagtailcore.blocks.URLBlock(required=True)), ('texte', wagtail.wagtailcore.blocks.CharBlock())))), ('contact', wagtail.wagtailcore.blocks.StructBlock((('email', wagtail.wagtailcore.blocks.EmailBlock(required=True)), ('texte', wagtail.wagtailcore.blocks.CharBlock()))))))),
|
||||
('links_fr', wagtail.wagtailcore.fields.StreamField((('lien', wagtail.wagtailcore.blocks.StructBlock((('url', wagtail.wagtailcore.blocks.URLBlock(required=True)), ('texte', wagtail.wagtailcore.blocks.CharBlock())))), ('contact', wagtail.wagtailcore.blocks.StructBlock((('email', wagtail.wagtailcore.blocks.EmailBlock(required=True)), ('texte', wagtail.wagtailcore.blocks.CharBlock()))))), null=True)),
|
||||
('links_en', wagtail.wagtailcore.fields.StreamField((('lien', wagtail.wagtailcore.blocks.StructBlock((('url', wagtail.wagtailcore.blocks.URLBlock(required=True)), ('texte', wagtail.wagtailcore.blocks.CharBlock())))), ('contact', wagtail.wagtailcore.blocks.StructBlock((('email', wagtail.wagtailcore.blocks.EmailBlock(required=True)), ('texte', wagtail.wagtailcore.blocks.CharBlock()))))), null=True)),
|
||||
('Image', models.ForeignKey(null=True, to='wagtailimages.Image', on_delete=django.db.models.deletion.SET_NULL, blank=True, related_name='+')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=('wagtailcore.page',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='COFDirectoryPage',
|
||||
fields=[
|
||||
('page_ptr', models.OneToOneField(primary_key=True, parent_link=True, serialize=False, auto_created=True, to='wagtailcore.Page')),
|
||||
('title_fr', models.CharField(null=True, verbose_name='title', help_text="The page title as you'd like it to be seen by the public", max_length=255)),
|
||||
('title_en', models.CharField(null=True, verbose_name='title', help_text="The page title as you'd like it to be seen by the public", max_length=255)),
|
||||
('slug_fr', models.SlugField(null=True, verbose_name='slug', help_text='The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/', max_length=255)),
|
||||
('slug_en', models.SlugField(null=True, verbose_name='slug', help_text='The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/', max_length=255)),
|
||||
('url_path_fr', models.TextField(null=True, blank=True, verbose_name='URL path', editable=False)),
|
||||
('url_path_en', models.TextField(null=True, blank=True, verbose_name='URL path', editable=False)),
|
||||
('seo_title_fr', models.CharField(null=True, blank=True, verbose_name='page title', help_text="Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.", max_length=255)),
|
||||
('seo_title_en', models.CharField(null=True, blank=True, verbose_name='page title', help_text="Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.", max_length=255)),
|
||||
('search_description_fr', models.TextField(null=True, blank=True, verbose_name='search description')),
|
||||
('search_description_en', models.TextField(null=True, blank=True, verbose_name='search description')),
|
||||
('introduction', wagtail.wagtailcore.fields.RichTextField(verbose_name='Introduction')),
|
||||
('introduction_fr', wagtail.wagtailcore.fields.RichTextField(null=True, verbose_name='Introduction')),
|
||||
('introduction_en', wagtail.wagtailcore.fields.RichTextField(null=True, verbose_name='Introduction')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=('wagtailcore.page',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='COFEvent',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('title', models.TextField(verbose_name='Titre')),
|
||||
('title_fr', models.TextField(null=True, verbose_name='Titre')),
|
||||
('title_en', models.TextField(null=True, verbose_name='Titre')),
|
||||
('description', wagtail.wagtailcore.fields.RichTextField(verbose_name='Description (concise)')),
|
||||
('description_fr', wagtail.wagtailcore.fields.RichTextField(null=True, verbose_name='Description (concise)')),
|
||||
('description_en', wagtail.wagtailcore.fields.RichTextField(null=True, verbose_name='Description (concise)')),
|
||||
('date_start', models.DateTimeField(verbose_name='Date et heure de début')),
|
||||
('date_end', models.DateTimeField(null=True, verbose_name='Date et heure de fin')),
|
||||
('all_day', models.BooleanField(verbose_name='Toute la journée', default=False)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='COFPage',
|
||||
fields=[
|
||||
('page_ptr', models.OneToOneField(primary_key=True, to='wagtailcore.Page', parent_link=True, auto_created=True, serialize=False)),
|
||||
('title_fr', models.CharField(help_text="The page title as you'd like it to be seen by the public", null=True, max_length=255, verbose_name='title')),
|
||||
('title_en', models.CharField(help_text="The page title as you'd like it to be seen by the public", null=True, max_length=255, verbose_name='title')),
|
||||
('slug_fr', models.SlugField(help_text='The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/', null=True, max_length=255, verbose_name='slug')),
|
||||
('slug_en', models.SlugField(help_text='The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/', null=True, max_length=255, verbose_name='slug')),
|
||||
('url_path_fr', models.TextField(blank=True, null=True, editable=False, verbose_name='URL path')),
|
||||
('url_path_en', models.TextField(blank=True, null=True, editable=False, verbose_name='URL path')),
|
||||
('seo_title_fr', models.CharField(help_text="Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.", null=True, blank=True, max_length=255, verbose_name='page title')),
|
||||
('seo_title_en', models.CharField(help_text="Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.", null=True, blank=True, max_length=255, verbose_name='page title')),
|
||||
('search_description_fr', models.TextField(blank=True, null=True, verbose_name='search description')),
|
||||
('search_description_en', models.TextField(blank=True, null=True, verbose_name='search description')),
|
||||
('corps', wagtail.wagtailcore.fields.RichTextField()),
|
||||
('corps_fr', wagtail.wagtailcore.fields.RichTextField(null=True)),
|
||||
('corps_en', wagtail.wagtailcore.fields.RichTextField(null=True)),
|
||||
('page_ptr', models.OneToOneField(primary_key=True, parent_link=True, serialize=False, auto_created=True, to='wagtailcore.Page')),
|
||||
('title_fr', models.CharField(null=True, verbose_name='title', help_text="The page title as you'd like it to be seen by the public", max_length=255)),
|
||||
('title_en', models.CharField(null=True, verbose_name='title', help_text="The page title as you'd like it to be seen by the public", max_length=255)),
|
||||
('slug_fr', models.SlugField(null=True, verbose_name='slug', help_text='The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/', max_length=255)),
|
||||
('slug_en', models.SlugField(null=True, verbose_name='slug', help_text='The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/', max_length=255)),
|
||||
('url_path_fr', models.TextField(null=True, blank=True, verbose_name='URL path', editable=False)),
|
||||
('url_path_en', models.TextField(null=True, blank=True, verbose_name='URL path', editable=False)),
|
||||
('seo_title_fr', models.CharField(null=True, blank=True, verbose_name='page title', help_text="Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.", max_length=255)),
|
||||
('seo_title_en', models.CharField(null=True, blank=True, verbose_name='page title', help_text="Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.", max_length=255)),
|
||||
('search_description_fr', models.TextField(null=True, blank=True, verbose_name='search description')),
|
||||
('search_description_en', models.TextField(null=True, blank=True, verbose_name='search description')),
|
||||
('body', wagtail.wagtailcore.fields.StreamField((('heading', wagtail.wagtailcore.blocks.CharBlock(classname='full title')), ('paragraph', wagtail.wagtailcore.blocks.RichTextBlock()), ('image', wagtail.wagtailimages.blocks.ImageChooserBlock())))),
|
||||
('body_fr', wagtail.wagtailcore.fields.StreamField((('heading', wagtail.wagtailcore.blocks.CharBlock(classname='full title')), ('paragraph', wagtail.wagtailcore.blocks.RichTextBlock()), ('image', wagtail.wagtailimages.blocks.ImageChooserBlock())), null=True)),
|
||||
('body_en', wagtail.wagtailcore.fields.StreamField((('heading', wagtail.wagtailcore.blocks.CharBlock(classname='full title')), ('paragraph', wagtail.wagtailcore.blocks.RichTextBlock()), ('image', wagtail.wagtailimages.blocks.ImageChooserBlock())), null=True)),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=('wagtailcore.page',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='COFRootPage',
|
||||
fields=[
|
||||
('page_ptr', models.OneToOneField(primary_key=True, parent_link=True, serialize=False, auto_created=True, to='wagtailcore.Page')),
|
||||
('title_fr', models.CharField(null=True, verbose_name='title', help_text="The page title as you'd like it to be seen by the public", max_length=255)),
|
||||
('title_en', models.CharField(null=True, verbose_name='title', help_text="The page title as you'd like it to be seen by the public", max_length=255)),
|
||||
('slug_fr', models.SlugField(null=True, verbose_name='slug', help_text='The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/', max_length=255)),
|
||||
('slug_en', models.SlugField(null=True, verbose_name='slug', help_text='The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/', max_length=255)),
|
||||
('url_path_fr', models.TextField(null=True, blank=True, verbose_name='URL path', editable=False)),
|
||||
('url_path_en', models.TextField(null=True, blank=True, verbose_name='URL path', editable=False)),
|
||||
('seo_title_fr', models.CharField(null=True, blank=True, verbose_name='page title', help_text="Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.", max_length=255)),
|
||||
('seo_title_en', models.CharField(null=True, blank=True, verbose_name='page title', help_text="Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.", max_length=255)),
|
||||
('search_description_fr', models.TextField(null=True, blank=True, verbose_name='search description')),
|
||||
('search_description_en', models.TextField(null=True, blank=True, verbose_name='search description')),
|
||||
('introduction', wagtail.wagtailcore.fields.RichTextField(verbose_name='Introduction')),
|
||||
('introduction_fr', wagtail.wagtailcore.fields.RichTextField(null=True, verbose_name='Introduction')),
|
||||
('introduction_en', wagtail.wagtailcore.fields.RichTextField(null=True, verbose_name='Introduction')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue