From: Guillaume Pellerin Date: Wed, 23 Dec 2015 12:15:09 +0000 (+0100) Subject: add all migrations to local app including model translations X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=8d22265cab1ecbd26af6039c3269dfc07bfd1831;p=mezzo.git add all migrations to local app including model translations --- diff --git a/app/deploy/start_app.sh b/app/deploy/start_app.sh index fb629976..0b17902b 100644 --- a/app/deploy/start_app.sh +++ b/app/deploy/start_app.sh @@ -15,8 +15,13 @@ autoreload=3 # waiting for other services sh $app/deploy/wait.sh +if [ ! -f $app/.init ]; then + python $manage makemigrations --noinput + touch $app/.init +fi + # django init -python $manage makemigrations --noinput +python $manage syncdb --noinput python $manage migrate --noinput python $manage collectstatic --noinput diff --git a/app/manifeste/migrations/blog/0001_initial.py b/app/manifeste/migrations/blog/0001_initial.py new file mode 100644 index 00000000..1124f8b4 --- /dev/null +++ b/app/manifeste/migrations/blog/0001_initial.py @@ -0,0 +1,69 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import mezzanine.core.fields +import mezzanine.utils.models +from django.conf import settings + + +class Migration(migrations.Migration): + + dependencies = [ + ('sites', '0001_initial'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='BlogCategory', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('title', models.CharField(max_length=500, verbose_name='Title')), + ('slug', models.CharField(help_text='Leave blank to have the URL auto-generated from the title.', max_length=2000, null=True, verbose_name='URL', blank=True)), + ('site', models.ForeignKey(editable=False, to='sites.Site')), + ], + options={ + 'ordering': ('title',), + 'verbose_name': 'Blog Category', + 'verbose_name_plural': 'Blog Categories', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='BlogPost', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('comments_count', models.IntegerField(default=0, editable=False)), + ('keywords_string', models.CharField(max_length=500, editable=False, blank=True)), + ('rating_count', models.IntegerField(default=0, editable=False)), + ('rating_sum', models.IntegerField(default=0, editable=False)), + ('rating_average', models.FloatField(default=0, editable=False)), + ('title', models.CharField(max_length=500, verbose_name='Title')), + ('slug', models.CharField(help_text='Leave blank to have the URL auto-generated from the title.', max_length=2000, null=True, verbose_name='URL', blank=True)), + ('_meta_title', models.CharField(help_text='Optional title to be used in the HTML title tag. If left blank, the main title field will be used.', max_length=500, null=True, verbose_name='Title', blank=True)), + ('description', models.TextField(verbose_name='Description', blank=True)), + ('gen_description', models.BooleanField(default=True, help_text='If checked, the description will be automatically generated from content. Uncheck if you want to manually set a custom description.', verbose_name='Generate description')), + ('created', models.DateTimeField(null=True, editable=False)), + ('updated', models.DateTimeField(null=True, editable=False)), + ('status', models.IntegerField(default=2, help_text='With Draft chosen, will only be shown for admin users on the site.', verbose_name='Status', choices=[(1, 'Draft'), (2, 'Published')])), + ('publish_date', models.DateTimeField(help_text="With Published chosen, won't be shown until this time", null=True, verbose_name='Published from', blank=True)), + ('expiry_date', models.DateTimeField(help_text="With Published chosen, won't be shown after this time", null=True, verbose_name='Expires on', blank=True)), + ('short_url', models.URLField(null=True, blank=True)), + ('in_sitemap', models.BooleanField(default=True, verbose_name='Show in sitemap')), + ('content', mezzanine.core.fields.RichTextField(verbose_name='Content')), + ('allow_comments', models.BooleanField(default=True, verbose_name='Allow comments')), + ('featured_image', mezzanine.core.fields.FileField(max_length=255, null=True, verbose_name='Featured Image', blank=True)), + ('categories', models.ManyToManyField(related_name='blogposts', verbose_name='Categories', to='blog.BlogCategory', blank=True)), + ('related_posts', models.ManyToManyField(related_name='related_posts_rel_+', verbose_name='Related posts', to='blog.BlogPost', blank=True)), + ('site', models.ForeignKey(editable=False, to='sites.Site')), + ('user', models.ForeignKey(related_name='blogposts', verbose_name='Author', to=settings.AUTH_USER_MODEL)), + ], + options={ + 'ordering': ('-publish_date',), + 'verbose_name': 'Blog post', + 'verbose_name_plural': 'Blog posts', + }, + bases=(models.Model, mezzanine.utils.models.AdminThumbMixin), + ), + ] diff --git a/app/manifeste/migrations/blog/0002_auto_20150527_1555.py b/app/manifeste/migrations/blog/0002_auto_20150527_1555.py new file mode 100644 index 00000000..a5cb65cc --- /dev/null +++ b/app/manifeste/migrations/blog/0002_auto_20150527_1555.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('blog', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='blogpost', + name='publish_date', + field=models.DateTimeField(help_text="With Published chosen, won't be shown until this time", null=True, verbose_name='Published from', db_index=True, blank=True), + ), + ] diff --git a/app/manifeste/migrations/blog/0003_auto_20151223_1313.py b/app/manifeste/migrations/blog/0003_auto_20151223_1313.py new file mode 100644 index 00000000..2d1da523 --- /dev/null +++ b/app/manifeste/migrations/blog/0003_auto_20151223_1313.py @@ -0,0 +1,65 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models +import mezzanine.core.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('blog', '0002_auto_20150527_1555'), + ] + + operations = [ + migrations.AddField( + model_name='blogcategory', + name='title_en', + field=models.CharField(max_length=500, null=True, verbose_name='Title'), + ), + migrations.AddField( + model_name='blogcategory', + name='title_fr', + field=models.CharField(max_length=500, null=True, verbose_name='Title'), + ), + migrations.AddField( + model_name='blogpost', + name='_meta_title_en', + field=models.CharField(help_text='Optional title to be used in the HTML title tag. If left blank, the main title field will be used.', max_length=500, null=True, verbose_name='Title', blank=True), + ), + migrations.AddField( + model_name='blogpost', + name='_meta_title_fr', + field=models.CharField(help_text='Optional title to be used in the HTML title tag. If left blank, the main title field will be used.', max_length=500, null=True, verbose_name='Title', blank=True), + ), + migrations.AddField( + model_name='blogpost', + name='content_en', + field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Content'), + ), + migrations.AddField( + model_name='blogpost', + name='content_fr', + field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Content'), + ), + migrations.AddField( + model_name='blogpost', + name='description_en', + field=models.TextField(null=True, verbose_name='Description', blank=True), + ), + migrations.AddField( + model_name='blogpost', + name='description_fr', + field=models.TextField(null=True, verbose_name='Description', blank=True), + ), + migrations.AddField( + model_name='blogpost', + name='title_en', + field=models.CharField(max_length=500, null=True, verbose_name='Title'), + ), + migrations.AddField( + model_name='blogpost', + name='title_fr', + field=models.CharField(max_length=500, null=True, verbose_name='Title'), + ), + ] diff --git a/app/manifeste/migrations/blog/__init__.py b/app/manifeste/migrations/blog/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/app/manifeste/migrations/conf/0001_initial.py b/app/manifeste/migrations/conf/0001_initial.py new file mode 100644 index 00000000..ce02a03b --- /dev/null +++ b/app/manifeste/migrations/conf/0001_initial.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('sites', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='Setting', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=50)), + ('value', models.CharField(max_length=2000)), + ('site', models.ForeignKey(editable=False, to='sites.Site')), + ], + options={ + 'verbose_name': 'Setting', + 'verbose_name_plural': 'Settings', + }, + bases=(models.Model,), + ), + ] diff --git a/app/manifeste/migrations/conf/0002_auto_20151223_1313.py b/app/manifeste/migrations/conf/0002_auto_20151223_1313.py new file mode 100644 index 00000000..fb2bf3c3 --- /dev/null +++ b/app/manifeste/migrations/conf/0002_auto_20151223_1313.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('conf', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='setting', + name='value_en', + field=models.CharField(max_length=2000, null=True), + ), + migrations.AddField( + model_name='setting', + name='value_fr', + field=models.CharField(max_length=2000, null=True), + ), + ] diff --git a/app/manifeste/migrations/conf/__init__.py b/app/manifeste/migrations/conf/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/app/manifeste/migrations/forms/0001_initial.py b/app/manifeste/migrations/forms/0001_initial.py new file mode 100644 index 00000000..fa1e791c --- /dev/null +++ b/app/manifeste/migrations/forms/0001_initial.py @@ -0,0 +1,94 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import mezzanine.core.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('pages', '__first__'), + ] + + operations = [ + migrations.CreateModel( + name='Field', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('_order', models.IntegerField(null=True, verbose_name='Order')), + ('label', models.CharField(max_length=200, verbose_name='Label')), + ('field_type', models.IntegerField(verbose_name='Type', choices=[(1, 'Single line text'), (2, 'Multi line text'), (3, 'Email'), (13, 'Number'), (14, 'URL'), (4, 'Check box'), (5, 'Check boxes'), (6, 'Drop down'), (7, 'Multi select'), (8, 'Radio buttons'), (9, 'File upload'), (10, 'Date'), (11, 'Date/time'), (15, 'Date of birth'), (12, 'Hidden')])), + ('required', models.BooleanField(default=True, verbose_name='Required')), + ('visible', models.BooleanField(default=True, verbose_name='Visible')), + ('choices', models.CharField(help_text='Comma separated options where applicable. If an option itself contains commas, surround the option with `backticks`.', max_length=1000, verbose_name='Choices', blank=True)), + ('default', models.CharField(max_length=2000, verbose_name='Default value', blank=True)), + ('placeholder_text', models.CharField(verbose_name='Placeholder Text', max_length=100, editable=False, blank=True)), + ('help_text', models.CharField(max_length=100, verbose_name='Help text', blank=True)), + ], + options={ + 'ordering': ('_order',), + 'verbose_name': 'Field', + 'verbose_name_plural': 'Fields', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='FieldEntry', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('field_id', models.IntegerField()), + ('value', models.CharField(max_length=2000, null=True)), + ], + options={ + 'verbose_name': 'Form field entry', + 'verbose_name_plural': 'Form field entries', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Form', + fields=[ + ('page_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='pages.Page')), + ('content', mezzanine.core.fields.RichTextField(verbose_name='Content')), + ('button_text', models.CharField(default='Submit', max_length=50, verbose_name='Button text')), + ('response', mezzanine.core.fields.RichTextField(verbose_name='Response')), + ('send_email', models.BooleanField(default=True, help_text='To send an email to the email address supplied in the form upon submission, check this box.', verbose_name='Send email to user')), + ('email_from', models.EmailField(help_text='The address the email will be sent from', max_length=75, verbose_name='From address', blank=True)), + ('email_copies', models.CharField(help_text='Provide a comma separated list of email addresses to be notified upon form submission. Leave blank to disable notifications.', max_length=200, verbose_name='Send email to others', blank=True)), + ('email_subject', models.CharField(max_length=200, verbose_name='Subject', blank=True)), + ('email_message', models.TextField(help_text='Emails sent based on the above options will contain each of the form fields entered. You can also enter a message here that will be included in the email.', verbose_name='Message', blank=True)), + ], + options={ + 'ordering': ('_order',), + 'verbose_name': 'Form', + 'verbose_name_plural': 'Forms', + }, + bases=('pages.page', models.Model), + ), + migrations.CreateModel( + name='FormEntry', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('entry_time', models.DateTimeField(verbose_name='Date/time')), + ('form', models.ForeignKey(related_name='entries', to='forms.Form')), + ], + options={ + 'verbose_name': 'Form entry', + 'verbose_name_plural': 'Form entries', + }, + bases=(models.Model,), + ), + migrations.AddField( + model_name='fieldentry', + name='entry', + field=models.ForeignKey(related_name='fields', to='forms.FormEntry'), + preserve_default=True, + ), + migrations.AddField( + model_name='field', + name='form', + field=models.ForeignKey(related_name='fields', to='forms.Form'), + preserve_default=True, + ), + ] diff --git a/app/manifeste/migrations/forms/0002_auto_20141227_0224.py b/app/manifeste/migrations/forms/0002_auto_20141227_0224.py new file mode 100644 index 00000000..8e8905e5 --- /dev/null +++ b/app/manifeste/migrations/forms/0002_auto_20141227_0224.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import mezzanine.core.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('forms', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='field', + name='_order', + field=mezzanine.core.fields.OrderField(null=True, verbose_name='Order'), + preserve_default=True, + ), + ] diff --git a/app/manifeste/migrations/forms/0003_emailfield.py b/app/manifeste/migrations/forms/0003_emailfield.py new file mode 100644 index 00000000..9f826c6a --- /dev/null +++ b/app/manifeste/migrations/forms/0003_emailfield.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import mezzanine.pages.managers + + +class Migration(migrations.Migration): + + dependencies = [ + ('forms', '0002_auto_20141227_0224'), + ] + + operations = [ + migrations.AlterField( + model_name='form', + name='email_from', + field=models.EmailField(help_text='The address the email will be sent from', max_length=254, verbose_name='From address', blank=True), + ), + ] diff --git a/app/manifeste/migrations/forms/0004_auto_20150517_0510.py b/app/manifeste/migrations/forms/0004_auto_20150517_0510.py new file mode 100644 index 00000000..b7cb5526 --- /dev/null +++ b/app/manifeste/migrations/forms/0004_auto_20150517_0510.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('forms', '0003_emailfield'), + ] + + operations = [ + migrations.AlterField( + model_name='form', + name='button_text', + field=models.CharField(max_length=50, verbose_name='Button text', blank=True), + ), + ] diff --git a/app/manifeste/migrations/forms/0005_auto_20151223_1313.py b/app/manifeste/migrations/forms/0005_auto_20151223_1313.py new file mode 100644 index 00000000..852552ac --- /dev/null +++ b/app/manifeste/migrations/forms/0005_auto_20151223_1313.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models +import mezzanine.core.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('forms', '0004_auto_20150517_0510'), + ] + + operations = [ + migrations.AddField( + model_name='field', + name='choices_en', + field=models.CharField(help_text='Comma separated options where applicable. If an option itself contains commas, surround the option with `backticks`.', max_length=1000, null=True, verbose_name='Choices', blank=True), + ), + migrations.AddField( + model_name='field', + name='choices_fr', + field=models.CharField(help_text='Comma separated options where applicable. If an option itself contains commas, surround the option with `backticks`.', max_length=1000, null=True, verbose_name='Choices', blank=True), + ), + migrations.AddField( + model_name='field', + name='default_en', + field=models.CharField(max_length=2000, null=True, verbose_name='Default value', blank=True), + ), + migrations.AddField( + model_name='field', + name='default_fr', + field=models.CharField(max_length=2000, null=True, verbose_name='Default value', blank=True), + ), + migrations.AddField( + model_name='field', + name='help_text_en', + field=models.CharField(max_length=100, null=True, verbose_name='Help text', blank=True), + ), + migrations.AddField( + model_name='field', + name='help_text_fr', + field=models.CharField(max_length=100, null=True, verbose_name='Help text', blank=True), + ), + migrations.AddField( + model_name='field', + name='label_en', + field=models.CharField(max_length=200, null=True, verbose_name='Label'), + ), + migrations.AddField( + model_name='field', + name='label_fr', + field=models.CharField(max_length=200, null=True, verbose_name='Label'), + ), + migrations.AddField( + model_name='field', + name='placeholder_text_en', + field=models.CharField(verbose_name='Placeholder Text', max_length=100, null=True, editable=False, blank=True), + ), + migrations.AddField( + model_name='field', + name='placeholder_text_fr', + field=models.CharField(verbose_name='Placeholder Text', max_length=100, null=True, editable=False, blank=True), + ), + migrations.AddField( + model_name='form', + name='button_text_en', + field=models.CharField(max_length=50, null=True, verbose_name='Button text', blank=True), + ), + migrations.AddField( + model_name='form', + name='button_text_fr', + field=models.CharField(max_length=50, null=True, verbose_name='Button text', blank=True), + ), + migrations.AddField( + model_name='form', + name='content_en', + field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Content'), + ), + migrations.AddField( + model_name='form', + name='content_fr', + field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Content'), + ), + migrations.AddField( + model_name='form', + name='email_message_en', + field=models.TextField(help_text='Emails sent based on the above options will contain each of the form fields entered. You can also enter a message here that will be included in the email.', null=True, verbose_name='Message', blank=True), + ), + migrations.AddField( + model_name='form', + name='email_message_fr', + field=models.TextField(help_text='Emails sent based on the above options will contain each of the form fields entered. You can also enter a message here that will be included in the email.', null=True, verbose_name='Message', blank=True), + ), + migrations.AddField( + model_name='form', + name='email_subject_en', + field=models.CharField(max_length=200, null=True, verbose_name='Subject', blank=True), + ), + migrations.AddField( + model_name='form', + name='email_subject_fr', + field=models.CharField(max_length=200, null=True, verbose_name='Subject', blank=True), + ), + migrations.AddField( + model_name='form', + name='response_en', + field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Response'), + ), + migrations.AddField( + model_name='form', + name='response_fr', + field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Response'), + ), + ] diff --git a/app/manifeste/migrations/forms/__init__.py b/app/manifeste/migrations/forms/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/app/manifeste/migrations/galleries/0001_initial.py b/app/manifeste/migrations/galleries/0001_initial.py new file mode 100644 index 00000000..11f1937e --- /dev/null +++ b/app/manifeste/migrations/galleries/0001_initial.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import mezzanine.core.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('pages', '__first__'), + ] + + operations = [ + migrations.CreateModel( + name='Gallery', + fields=[ + ('page_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='pages.Page')), + ('content', mezzanine.core.fields.RichTextField(verbose_name='Content')), + ('zip_import', models.FileField(help_text="Upload a zip file containing images, and they'll be imported into this gallery.", upload_to='galleries', verbose_name='Zip import', blank=True)), + ], + options={ + 'ordering': ('_order',), + 'verbose_name': 'Gallery', + 'verbose_name_plural': 'Galleries', + }, + bases=('pages.page', models.Model), + ), + migrations.CreateModel( + name='GalleryImage', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('_order', models.IntegerField(null=True, verbose_name='Order')), + ('file', mezzanine.core.fields.FileField(max_length=200, verbose_name='File')), + ('description', models.CharField(max_length=1000, verbose_name='Description', blank=True)), + ('gallery', models.ForeignKey(related_name='images', to='galleries.Gallery')), + ], + options={ + 'ordering': ('_order',), + 'verbose_name': 'Image', + 'verbose_name_plural': 'Images', + }, + bases=(models.Model,), + ), + ] diff --git a/app/manifeste/migrations/galleries/0002_auto_20141227_0224.py b/app/manifeste/migrations/galleries/0002_auto_20141227_0224.py new file mode 100644 index 00000000..89bf6338 --- /dev/null +++ b/app/manifeste/migrations/galleries/0002_auto_20141227_0224.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import mezzanine.core.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('galleries', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='galleryimage', + name='_order', + field=mezzanine.core.fields.OrderField(null=True, verbose_name='Order'), + preserve_default=True, + ), + ] diff --git a/app/manifeste/migrations/galleries/0003_auto_20151223_1313.py b/app/manifeste/migrations/galleries/0003_auto_20151223_1313.py new file mode 100644 index 00000000..2a618524 --- /dev/null +++ b/app/manifeste/migrations/galleries/0003_auto_20151223_1313.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models +import mezzanine.core.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('galleries', '0002_auto_20141227_0224'), + ] + + operations = [ + migrations.AddField( + model_name='gallery', + name='content_en', + field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Content'), + ), + migrations.AddField( + model_name='gallery', + name='content_fr', + field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Content'), + ), + migrations.AddField( + model_name='galleryimage', + name='description_en', + field=models.CharField(max_length=1000, null=True, verbose_name='Description', blank=True), + ), + migrations.AddField( + model_name='galleryimage', + name='description_fr', + field=models.CharField(max_length=1000, null=True, verbose_name='Description', blank=True), + ), + ] diff --git a/app/manifeste/migrations/galleries/__init__.py b/app/manifeste/migrations/galleries/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/app/manifeste/migrations/pages/0001_initial.py b/app/manifeste/migrations/pages/0001_initial.py new file mode 100644 index 00000000..4429c29b --- /dev/null +++ b/app/manifeste/migrations/pages/0001_initial.py @@ -0,0 +1,83 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import mezzanine.core.fields +import mezzanine.pages.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('sites', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='Page', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('keywords_string', models.CharField(max_length=500, editable=False, blank=True)), + ('title', models.CharField(max_length=500, verbose_name='Title')), + ('slug', models.CharField(help_text='Leave blank to have the URL auto-generated from the title.', max_length=2000, null=True, verbose_name='URL', blank=True)), + ('_meta_title', models.CharField(help_text='Optional title to be used in the HTML title tag. If left blank, the main title field will be used.', max_length=500, null=True, verbose_name='Title', blank=True)), + ('description', models.TextField(verbose_name='Description', blank=True)), + ('gen_description', models.BooleanField(default=True, help_text='If checked, the description will be automatically generated from content. Uncheck if you want to manually set a custom description.', verbose_name='Generate description')), + ('created', models.DateTimeField(null=True, editable=False)), + ('updated', models.DateTimeField(null=True, editable=False)), + ('status', models.IntegerField(default=2, help_text='With Draft chosen, will only be shown for admin users on the site.', verbose_name='Status', choices=[(1, 'Draft'), (2, 'Published')])), + ('publish_date', models.DateTimeField(help_text="With Published chosen, won't be shown until this time", null=True, verbose_name='Published from', blank=True)), + ('expiry_date', models.DateTimeField(help_text="With Published chosen, won't be shown after this time", null=True, verbose_name='Expires on', blank=True)), + ('short_url', models.URLField(null=True, blank=True)), + ('in_sitemap', models.BooleanField(default=True, verbose_name='Show in sitemap')), + ('_order', models.IntegerField(null=True, verbose_name='Order')), + ('in_menus', mezzanine.pages.fields.MenusField(default=(1, 2, 3), choices=[(1, 'Top navigation bar'), (2, 'Left-hand tree'), (3, 'Footer')], max_length=100, blank=True, null=True, verbose_name='Show in menus')), + ('titles', models.CharField(max_length=1000, null=True, editable=False)), + ('content_model', models.CharField(max_length=50, null=True, editable=False)), + ('login_required', models.BooleanField(default=False, help_text='If checked, only logged in users can view this page', verbose_name='Login required')), + ], + options={ + 'ordering': ('titles',), + 'verbose_name': 'Page', + 'verbose_name_plural': 'Pages', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='Link', + fields=[ + ('page_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='pages.Page')), + ], + options={ + 'ordering': ('_order',), + 'verbose_name': 'Link', + 'verbose_name_plural': 'Links', + }, + bases=('pages.page',), + ), + migrations.CreateModel( + name='RichTextPage', + fields=[ + ('page_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='pages.Page')), + ('content', mezzanine.core.fields.RichTextField(verbose_name='Content')), + ], + options={ + 'ordering': ('_order',), + 'verbose_name': 'Rich text page', + 'verbose_name_plural': 'Rich text pages', + }, + bases=('pages.page', models.Model), + ), + migrations.AddField( + model_name='page', + name='parent', + field=models.ForeignKey(related_name='children', blank=True, to='pages.Page', null=True), + preserve_default=True, + ), + migrations.AddField( + model_name='page', + name='site', + field=models.ForeignKey(editable=False, to='sites.Site'), + preserve_default=True, + ), + ] diff --git a/app/manifeste/migrations/pages/0002_auto_20141227_0224.py b/app/manifeste/migrations/pages/0002_auto_20141227_0224.py new file mode 100644 index 00000000..85bddb26 --- /dev/null +++ b/app/manifeste/migrations/pages/0002_auto_20141227_0224.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import mezzanine.pages.fields +import mezzanine.core.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('pages', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='page', + name='_order', + field=mezzanine.core.fields.OrderField(null=True, verbose_name='Order'), + preserve_default=True, + ), + migrations.AlterField( + model_name='page', + name='in_menus', + field=mezzanine.pages.fields.MenusField(max_length=100, null=True, verbose_name='Show in menus', blank=True), + preserve_default=True, + ), + ] diff --git a/app/manifeste/migrations/pages/0003_auto_20150527_1555.py b/app/manifeste/migrations/pages/0003_auto_20150527_1555.py new file mode 100644 index 00000000..b0682fee --- /dev/null +++ b/app/manifeste/migrations/pages/0003_auto_20150527_1555.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('pages', '0002_auto_20141227_0224'), + ] + + operations = [ + migrations.AlterField( + model_name='page', + name='publish_date', + field=models.DateTimeField(help_text="With Published chosen, won't be shown until this time", null=True, verbose_name='Published from', db_index=True, blank=True), + ), + ] diff --git a/app/manifeste/migrations/pages/0004_auto_20151223_1313.py b/app/manifeste/migrations/pages/0004_auto_20151223_1313.py new file mode 100644 index 00000000..6f0ca5ec --- /dev/null +++ b/app/manifeste/migrations/pages/0004_auto_20151223_1313.py @@ -0,0 +1,65 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models +import mezzanine.core.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('pages', '0003_auto_20150527_1555'), + ] + + operations = [ + migrations.AddField( + model_name='page', + name='_meta_title_en', + field=models.CharField(help_text='Optional title to be used in the HTML title tag. If left blank, the main title field will be used.', max_length=500, null=True, verbose_name='Title', blank=True), + ), + migrations.AddField( + model_name='page', + name='_meta_title_fr', + field=models.CharField(help_text='Optional title to be used in the HTML title tag. If left blank, the main title field will be used.', max_length=500, null=True, verbose_name='Title', blank=True), + ), + migrations.AddField( + model_name='page', + name='description_en', + field=models.TextField(null=True, verbose_name='Description', blank=True), + ), + migrations.AddField( + model_name='page', + name='description_fr', + field=models.TextField(null=True, verbose_name='Description', blank=True), + ), + migrations.AddField( + model_name='page', + name='title_en', + field=models.CharField(max_length=500, null=True, verbose_name='Title'), + ), + migrations.AddField( + model_name='page', + name='title_fr', + field=models.CharField(max_length=500, null=True, verbose_name='Title'), + ), + migrations.AddField( + model_name='page', + name='titles_en', + field=models.CharField(max_length=1000, null=True, editable=False), + ), + migrations.AddField( + model_name='page', + name='titles_fr', + field=models.CharField(max_length=1000, null=True, editable=False), + ), + migrations.AddField( + model_name='richtextpage', + name='content_en', + field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Content'), + ), + migrations.AddField( + model_name='richtextpage', + name='content_fr', + field=mezzanine.core.fields.RichTextField(null=True, verbose_name='Content'), + ), + ] diff --git a/app/manifeste/migrations/pages/__init__.py b/app/manifeste/migrations/pages/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/app/manifeste/settings.py b/app/manifeste/settings.py index 48596778..b7e95642 100644 --- a/app/manifeste/settings.py +++ b/app/manifeste/settings.py @@ -57,8 +57,8 @@ PAGE_MENU_TEMPLATES = ( # ``django.models.db.`` can be omitted for regular Django model fields. # -EXTRA_MODEL_FIELDS = ( - ) +# EXTRA_MODEL_FIELDS = ( +# ) # Setting to turn on featured images for blog posts. Defaults to False. # @@ -216,6 +216,15 @@ INSTALLED_APPS = ( # "mezzanine.mobile", ) +# Add Migration Module path see : https://github.com/stephenmcd/mezzanine/blob/master/docs/model-customization.rst#field-injection-caveats +MIGRATION_MODULES = { + "blog": "manifeste.migrations.blog", + "forms": "manifeste.migrations.forms", + "galleries": "manifeste.migrations.galleries", + "pages": "manifeste.migrations.pages", + "conf": "manifeste.migrations.conf", +} + # List of processors used by RequestContext to populate the context. # Each one should be a callable that takes the request object as its # only parameter and returns a dictionary to add to the context.