--- /dev/null
+[submodule "app/apps/presta2eve"]
+ path = app/apps/presta2eve
+ url = git+ssh://git@git.forge.ircam.fr/presta2eve.git
This is the new template for the Manifeste festival website at IRCAM. It is based on the Mezzanine CMS which is itself based on Django.
+
Install
=========
First install `Git <http://git-scm.com/downloads>`_, `Docker engine <https://docs.docker.com/installation/>`_ and `docker-compose <https://docs.docker.com/compose/install/>`_.
+
Linux
------
cd Manifeste
docker-compose run db /srv/backup/restore_db.sh
+ docker-compose run pgdb /srv/backup/restore_db_eve.sh
You should be able to browse the site at http://localhost:8010/
+
MacOS or Windows:
------------------
eval "$(docker-machine env manifeste)"
cd Manifeste
docker-compose run db /srv/backup/restore_db.sh
+ docker-compose run pgdb /srv/backup/restore_db_eve.sh
`More info <https://docs.docker.com/>`_ about using docker and related tools.
--- /dev/null
+Subproject commit 78bcac45c47ffd7a6f41efa55eac76755a8153ad
# waiting for available database
# python $app/wait.py
+# python $manage wait-for-db-connection
# django init
# python $manage syncdb --noinput
python $manage migrate --noinput
python $manage collectstatic --noinput
+python $manage create-admin-user
# static files auto update
watchmedo shell-command --patterns="*.js;*.css" --recursive \
--- /dev/null
+from django.contrib import admin
+from festival.models import *
+
+admin.site.register(Event)
+admin.site.register(Artist)
+admin.site.register(Location)
+admin.site.register(Video)
--- /dev/null
+from optparse import make_option
+from django.conf import settings
+from django.core.management.base import BaseCommand, CommandError
+from django.contrib.auth.models import User
+
+
+class Command(BaseCommand):
+ help = """Create a default admin user if it doesn't exist.
+ you SHOULD change the password and the email afterwards!"""
+
+ username = 'admin'
+ password = 'admin'
+ email = 'root@example.com'
+
+ def handle(self, *args, **options):
+ admin = User.objects.filter(username=self.username)
+ if not admin:
+ user = User(username=self.username)
+ user.set_password(self.password)
+ user.email = self.email
+ user.is_superuser = True
+ user.is_staff = True
+ user.save()
+ print 'User "'+ self.username + '" created'
--- /dev/null
+from django.conf import settings
+from django.core.management.base import BaseCommand, CommandError
+from django.db import connection
+
+
+class Command(BaseCommand):
+ help = "Wait for database connection"
+
+ def handle(self, *args, **options):
+ up = False
+ while not up:
+ try:
+ cursor = connection.cursor()
+ up = True
+ except:
+ time.sleep(1)
--- /dev/null
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('sites', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Artist',
+ fields=[
+ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+ ('name', models.CharField(max_length=255, verbose_name='name')),
+ ('photo', models.ImageField(upload_to=b'photos/%Y/%m/%d', max_length=1024, verbose_name='photo')),
+ ],
+ ),
+ migrations.CreateModel(
+ name='Event',
+ 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', db_index=True, 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')),
+ ('event_id', models.IntegerField()),
+ ('artists', models.ManyToManyField(related_name='events', null=True, verbose_name='events', to='festival.Artist', blank=True)),
+ ('site', models.ForeignKey(editable=False, to='sites.Site')),
+ ],
+ options={
+ 'db_table': 'event',
+ 'verbose_name': 'event',
+ },
+ ),
+ migrations.CreateModel(
+ name='Location',
+ fields=[
+ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+ ('location_id', models.IntegerField()),
+ ],
+ ),
+ migrations.CreateModel(
+ name='Video',
+ 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', db_index=True, 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')),
+ ('media_id', models.IntegerField(verbose_name='media ID')),
+ ('artists', models.ManyToManyField(related_name='videos', null=True, verbose_name='artists', to='festival.Artist', blank=True)),
+ ('site', models.ForeignKey(editable=False, to='sites.Site')),
+ ],
+ options={
+ 'abstract': False,
+ },
+ ),
+ ]
--- /dev/null
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('festival', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='event',
+ name='artists',
+ field=models.ManyToManyField(related_name='events', verbose_name='events', to='festival.Artist', blank=True),
+ ),
+ migrations.AlterField(
+ model_name='video',
+ name='artists',
+ field=models.ManyToManyField(related_name='videos', verbose_name='artists', to='festival.Artist', blank=True),
+ ),
+ ]
--- /dev/null
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import mezzanine.core.fields
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('festival', '0002_auto_20160201_2339'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='artist',
+ name='content',
+ field=mezzanine.core.fields.RichTextField(default='', verbose_name='Content'),
+ preserve_default=False,
+ ),
+ ]
--- /dev/null
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import mezzanine.core.fields
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('festival', '0003_artist_content'),
+ ]
+
+ operations = [
+ migrations.RemoveField(
+ model_name='artist',
+ name='content',
+ ),
+ migrations.AddField(
+ model_name='artist',
+ name='bio',
+ field=mezzanine.core.fields.RichTextField(null=True, verbose_name='bio', blank=True),
+ ),
+ ]
--- /dev/null
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('festival', '0004_auto_20160202_0002'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='artist',
+ name='photo_credits',
+ field=models.CharField(max_length=255, null=True, verbose_name='photo credits', blank=True),
+ ),
+ migrations.AlterField(
+ model_name='event',
+ name='artists',
+ field=models.ManyToManyField(related_name='events', verbose_name='artists', to='festival.Artist', blank=True),
+ ),
+ ]
--- /dev/null
+from django.db import models
+from django.utils.translation import ugettext_lazy as _
+
+from mezzanine.core.models import RichText, Displayable
+from mezzanine.core.fields import RichTextField, OrderField
+
+import eve.models
+
+from .related import SpanningForeignKey
+
+
+class MetaCore:
+
+ app_label = 'festival'
+
+
+class Event(Displayable):
+ """(Event description)"""
+
+ event_id = models.IntegerField()
+ # event = SpanningForeignKey(eve.models.EventVersion, related_name='festival_events', verbose_name=_('E-venement event'), blank=True, null=True, default=None)
+ rich_description = RichText(_('rich description'))
+ artists = models.ManyToManyField('Artist', related_name='events', verbose_name=_('artists'), blank=True)
+
+ class Meta(MetaCore):
+ verbose_name = _('event')
+ db_table = 'event'
+
+ def __unicode__(self):
+ return self.title
+
+
+class Artist(models.Model):
+ """(Artist description)"""
+
+ name = models.CharField(_('name'), max_length=255)
+ photo = models.ImageField(_('photo'), upload_to='photos/%Y/%m/%d', max_length=1024)
+ photo_credits = models.CharField(_('photo credits'), max_length=255, blank=True, null=True)
+ bio = RichTextField(_("bio"), blank=True, null=True)
+
+ search_fields = ("name", "bio")
+
+ def __unicode__(self):
+ return self.name
+
+
+class Video(Displayable):
+ """(Video description)"""
+
+ media_id = models.IntegerField(_('media ID'))
+ artists = models.ManyToManyField('Artist', related_name='videos', verbose_name=_('artists'), blank=True)
+
+ def __unicode__(self):
+ return u"Video"
+
+
+class Location(models.Model):
+ """(Location description)"""
+
+ location_id = models.IntegerField()
+
+ def __unicode__(self):
+ return u"Location"
--- /dev/null
+from django.core import exceptions
+from django.db.models.fields.related import ForeignKey
+from django.db.utils import ConnectionHandler, ConnectionRouter
+
+connections = ConnectionHandler()
+router = ConnectionRouter()
+
+
+class SpanningForeignKey(ForeignKey):
+
+ def validate(self, value, model_instance):
+ if self.rel.parent_link:
+ return
+ # Call the grandparent rather than the parent to skip validation
+ super(ForeignKey, self).validate(value, model_instance)
+ if value is None:
+ return
+
+ using = router.db_for_read(self.rel.to, instance=model_instance)
+ qs = self.rel.to._default_manager.using(using).filter(
+ **{self.rel.field_name: value}
+ )
+ qs = qs.complex_filter(self.get_limit_choices_to())
+ if not qs.exists():
+ raise exceptions.ValidationError(
+ self.error_messages['invalid'],
+ code='invalid',
+ params={
+ 'model': self.rel.to._meta.verbose_name, 'pk': value,
+ 'field': self.rel.field_name, 'value': value,
+ }, # 'pk' is included for backwards compatibility
+ )
--- /dev/null
+
+class FestivalRouter(object):
+ """
+ A router to control all database operations on models in festival
+ """
+
+ def db_for_read(self, model, **hints):
+ if model._meta.app_label == 'festival':
+ return 'default'
+ return None
+
+ def db_for_write(self, model, **hints):
+ if model._meta.app_label == 'festival':
+ return 'default'
+ return None
+
+ def allow_relation(self, obj1, obj2, **hints):
+ if obj1._meta.app_label == 'festival' or \
+ obj2._meta.app_label == 'festival':
+ return True
+ return None
+
+ # def allow_migrate(self, db, app_label, model=None, **hints):
+ # if app_label == 'festival':
+ # return db == 'default'
+ # return None
+
+ def allow_migrate(self, db, app_label, model_name=None, **hints):
+ if 'target_db' in hints:
+ return db == hints['target_db']
+ return True
--- /dev/null
+{% extends "base.html" %}
+{% load i18n %}
+{% load mezzanine_tags keyword_tags %}
+
+{% block main %}
+
+<div class="artist-name">
+ <h1>{{ artist.name }}</h1>
+</div>
+
+<div class="artist-bio">
+ {{ artist.bio|safe }}
+</div>
+
+{% endblock %}
--- /dev/null
+{% extends "base.html" %}
+{% load i18n %}
+{% load mezzanine_tags keyword_tags %}
+
+{% block main %}
+
+<div class="artist-list">
+ <ul>
+ {% for artist in object_list %}
+ <li><a href="{% url 'festival-artist-detail' artist.id %}">{{ artist.name }}</a></li>
+ {% endfor %}
+ </ul>
+</div>
+
+{% endblock %}
--- /dev/null
+from django.test import TestCase
+
+# Create your tests here.
--- /dev/null
+from __future__ import unicode_literals
+
+from django.conf.urls import patterns, include, url
+from django.conf.urls.i18n import i18n_patterns
+from django.contrib import admin
+
+from mezzanine.core.views import direct_to_template
+from mezzanine.conf import settings
+
+from festival.views import *
+
+urlpatterns = patterns('',
+ url(r'^artists/$', ArtistListView.as_view(), name="festival-artists"),
+ url(r'^artists/(?P<pk>.*)/$', ArtistDetailView.as_view(), name="festival-artist-detail"),
+
+)
--- /dev/null
+from django.shortcuts import render
+from django.views.generic import *
+from django.views.generic.base import *
+
+from festival.models import *
+
+
+class ArtistListView(ListView):
+
+ model = Artist
+ template_name='festival/artist_list.html'
+
+ def get_context_data(self, **kwargs):
+ context = super(ArtistListView, self).get_context_data(**kwargs)
+ return context
+
+
+class ArtistDetailView(DetailView):
+
+ model = Artist
+ template_name='festival/artist_detail.html'
+ context_object_name = 'artist'
+
+ def get_context_data(self, **kwargs):
+ context = super(ArtistDetailView, self).get_context_data(**kwargs)
+ return context
+++ /dev/null
-from django.contrib import admin
-
-# Register your models here.
+++ /dev/null
-from django.db import models
-
-# Create your models here.
+++ /dev/null
-from django.test import TestCase
-
-# Create your tests here.
+++ /dev/null
-from django.shortcuts import render
-
-# Create your views here.
--- /dev/null
+# -*- 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),
+ ),
+ ]
--- /dev/null
+# -*- 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),
+ ),
+ ]
--- /dev/null
+# -*- 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'),
+ ),
+ ]
--- /dev/null
+# -*- 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,),
+ ),
+ ]
--- /dev/null
+# -*- 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),
+ ),
+ ]
--- /dev/null
+# -*- 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,
+ ),
+ ]
--- /dev/null
+# -*- 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,
+ ),
+ ]
--- /dev/null
+# -*- 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),
+ ),
+ ]
--- /dev/null
+# -*- 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),
+ ),
+ ]
--- /dev/null
+# -*- 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'),
+ ),
+ ]
--- /dev/null
+# -*- 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,),
+ ),
+ ]
--- /dev/null
+# -*- 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,
+ ),
+ ]
--- /dev/null
+# -*- 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),
+ ),
+ ]
--- /dev/null
+# -*- 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,
+ ),
+ ]
--- /dev/null
+# -*- 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,
+ ),
+ ]
--- /dev/null
+# -*- 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),
+ ),
+ ]
--- /dev/null
+# -*- 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'),
+ ),
+ ]
SECRET_KEY = "+3b01&_6_m@@yb4f06$s0zno8vkybh81nbuj_q(xzk+xeih1+s"
NEVERCACHE_KEY = "l11tr%#!uc@+%$51(&+%=&z6h9yrw42(jpcj$3_&6evtu6hl%z"
-DATABASE_ROUTERS = ['eve.routers.EveRouter', ]
+# DATABASE_ROUTERS = ['eve.routers.EveRouter', 'festival.routers.FestivalRouter',]
+DATABASE_ROUTERS = ['eve.routers.EveRouter',]
DATABASES = {
+ # 'default': {
+ # 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
+ # 'USER': os.environ.get('DB_ENV_MYSQL_USER'), # Not used with sqlite3.
+ # 'PASSWORD': os.environ.get('DB_ENV_MYSQL_PASSWORD'), # Not used with sqlite3.
+ # 'NAME': os.environ.get('DB_ENV_MYSQL_DATABASE'),
+ # 'HOST': 'db', # Set to empty string for localhost. Not used with sqlite3.
+ # 'PORT': '3306', # Set to empty string for default. Not used with sqlite3.
+ # },
'default': {
- 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
- 'USER': os.environ.get('DB_ENV_MYSQL_USER'), # Not used with sqlite3.
- 'PASSWORD': os.environ.get('DB_ENV_MYSQL_PASSWORD'), # Not used with sqlite3.
- 'NAME': os.environ.get('DB_ENV_MYSQL_DATABASE'),
+ 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
+ 'USER': 'postgres', # Not used with sqlite3.
+ 'PASSWORD': 'mysecretpassword', # Not used with sqlite3.
+ 'NAME': 'manifeste',
'HOST': 'db', # Set to empty string for localhost. Not used with sqlite3.
- 'PORT': '3306', # Set to empty string for default. Not used with sqlite3.
+ 'PORT': '5432', # Set to empty string for default. Not used with sqlite3.
},
'eve': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
--- /dev/null
+from django.core.exceptions import MiddlewareNotUsed
+from django.conf import settings
+from django.core.management import call_command
+
+
+class StartupMiddleware(object):
+
+ def __init__(self):
+ up = False
+ print 'check..................................'
+ while not up:
+ try:
+ # # The following db settings name is django 1.2. django < 1.2 will use settings.DATABASE_NAME
+ # if settings.DATABASES['default']['NAME'] == ':memory:':
+ call_command('syncdb', interactive=False)
+ call_command('collectstatic', interactive=False)
+ up = True
+ except:
+ print 'waiting...'
+ time.sleep(1)
+
+ raise MiddlewareNotUsed('Startup complete')
+++ /dev/null
-# -*- 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),
- ),
- ]
+++ /dev/null
-# -*- 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),
- ),
- ]
+++ /dev/null
-# -*- 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'),
- ),
- ]
+++ /dev/null
-# -*- 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,),
- ),
- ]
+++ /dev/null
-# -*- 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),
- ),
- ]
+++ /dev/null
-# -*- 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,
- ),
- ]
+++ /dev/null
-# -*- 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,
- ),
- ]
+++ /dev/null
-# -*- 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),
- ),
- ]
+++ /dev/null
-# -*- 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),
- ),
- ]
+++ /dev/null
-# -*- 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'),
- ),
- ]
+++ /dev/null
-# -*- 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,),
- ),
- ]
+++ /dev/null
-# -*- 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,
- ),
- ]
+++ /dev/null
-# -*- 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),
- ),
- ]
+++ /dev/null
-# -*- 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,
- ),
- ]
+++ /dev/null
-# -*- 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,
- ),
- ]
+++ /dev/null
-# -*- 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),
- ),
- ]
+++ /dev/null
-# -*- 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'),
- ),
- ]
"mezzanine.twitter",
"mezzanine.accounts",
# "mezzanine.mobile",
- "eve",
+ # "eve",
+ "festival",
)
# Add Migration Module path see : https://github.com/stephenmcd/mezzanine/blob/master/docs/model-customization.rst#field-injection-caveats
MIGRATION_MODULES = {
- "blog": "sandbox.migrations.blog",
- "forms": "sandbox.migrations.forms",
- "galleries": "sandbox.migrations.galleries",
- "pages": "sandbox.migrations.pages",
- "conf": "sandbox.migrations.conf",
+ "blog": "migrations.blog",
+ "forms": "migrations.forms",
+ "galleries": "migrations.galleries",
+ "pages": "migrations.pages",
+ "conf": "migrations.conf",
}
# List of processors used by RequestContext to populate the context.
# these middleware classes will be applied in the order given, and in the
# response phase the middleware will be applied in reverse order.
MIDDLEWARE_CLASSES = (
+ # 'sandbox.middleware.StartupMiddleware',
"mezzanine.core.middleware.UpdateCacheMiddleware",
'django.contrib.sessions.middleware.SessionMiddleware',
# Uncomment if using internationalisation or localisation
)
urlpatterns += patterns('',
- # (r'^newsletter/', include('newsletter.urls')),
+ (r'^festival/', include('festival.urls')),
# We don't want to presume how your homepage works, so here are a
# few patterns you can use to set it up.
up = False
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sandbox.settings")
-# while not up:
-# try:
-call_command('syncdb', interactive=False)
- # up = True
- # except:
- # time.sleep(1)
+while not up:
+ try:
+ call_command('syncdb', interactive=False)
+ up = True
+ except:
+ print 'waiting...'
+ time.sleep(10)
+ call_command('syncdb', interactive=False)
- ./data/backup/:/srv/backup
command: "true"
+# db:
+# image: mariadb
+# volumes_from:
+# - data
+# volumes:
+# - ./data/var/lib/mysql/:/var/lib/mysql
+# environment:
+# - MYSQL_ROOT_PASSWORD=hyRob0otlaz4
+# - MYSQL_DATABASE=manifeste
+# - MYSQL_USER=manifeste
+# - MYSQL_PASSWORD=Onukifsid7
+
db:
- image: mariadb
+ image: postgres
+ volumes:
+ - ./data/var/lib/postgresql/manifeste/data/:/var/lib/postgresql/data
volumes_from:
- data
- volumes:
- - ./data/var/lib/mysql/:/var/lib/mysql
environment:
- - MYSQL_ROOT_PASSWORD=hyRob0otlaz4
- - MYSQL_DATABASE=manifeste
- - MYSQL_USER=manifeste
- - MYSQL_PASSWORD=Onukifsid7
+ - POSTGRES_PASSWORD=mysecretpassword
+ - POSTGRES_USER=postgres
+ - POSTGRES_DB=manifeste
+
pgdb:
image: postgres
+ volumes:
+ - ./data/var/lib/postgresql/eve/data/:/var/lib/postgresql/data
volumes_from:
- data
environment:
- POSTGRES_PASSWORD=mysecretpassword
- POSTGRES_USER=postgres
+ - POSTGRES_DB=eve
app:
build: .
django-meta
mezzanine-bsbanners
psycopg2
+#django-location-field