Created initial Django 1.7 migrations

This commit is contained in:
Karl Hobley 2014-07-23 11:36:25 +01:00
parent c5044eb0e5
commit 3c64287488
18 changed files with 679 additions and 0 deletions

View file

@ -0,0 +1,298 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.db.models.deletion
import wagtail.wagtailsearch.indexed
import modelcluster.fields
import wagtail.wagtailcore.fields
class Migration(migrations.Migration):
dependencies = [
('wagtailimages', '0001_initial'),
('wagtailcore', '0001_initial'),
('wagtaildocs', '__latest__'),
]
operations = [
migrations.CreateModel(
name='Advert',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('url', models.URLField(null=True, blank=True)),
('text', models.CharField(max_length=255)),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='AlphaSnippet',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('text', models.CharField(max_length=255)),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='BusinessChild',
fields=[
('page_ptr', models.OneToOneField(auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
],
options={
'abstract': False,
},
bases=('wagtailcore.page',),
),
migrations.CreateModel(
name='BusinessIndex',
fields=[
('page_ptr', models.OneToOneField(auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
],
options={
'abstract': False,
},
bases=('wagtailcore.page',),
),
migrations.CreateModel(
name='BusinessSubIndex',
fields=[
('page_ptr', models.OneToOneField(auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
],
options={
'abstract': False,
},
bases=('wagtailcore.page',),
),
migrations.CreateModel(
name='EventIndex',
fields=[
('page_ptr', models.OneToOneField(auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
('intro', wagtail.wagtailcore.fields.RichTextField(blank=True)),
],
options={
'abstract': False,
},
bases=('wagtailcore.page',),
),
migrations.CreateModel(
name='EventPage',
fields=[
('page_ptr', models.OneToOneField(auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
('date_from', models.DateField(null=True, verbose_name=b'Start date')),
('date_to', models.DateField(help_text=b'Not required if event is on a single day', null=True, verbose_name=b'End date', blank=True)),
('time_from', models.TimeField(null=True, verbose_name=b'Start time', blank=True)),
('time_to', models.TimeField(null=True, verbose_name=b'End time', blank=True)),
('audience', models.CharField(max_length=255, choices=[(b'public', b'Public'), (b'private', b'Private')])),
('location', models.CharField(max_length=255)),
('body', wagtail.wagtailcore.fields.RichTextField(blank=True)),
('cost', models.CharField(max_length=255)),
('signup_link', models.URLField(blank=True)),
('feed_image', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)),
],
options={
'abstract': False,
},
bases=('wagtailcore.page',),
),
migrations.CreateModel(
name='EventPageCarouselItem',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('sort_order', models.IntegerField(null=True, editable=False, blank=True)),
('link_external', models.URLField(verbose_name=b'External link', blank=True)),
('embed_url', models.URLField(verbose_name=b'Embed URL', blank=True)),
('caption', models.CharField(max_length=255, blank=True)),
('image', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)),
('link_document', models.ForeignKey(blank=True, to='wagtaildocs.Document', null=True)),
('link_page', models.ForeignKey(blank=True, to='wagtailcore.Page', null=True)),
('page', modelcluster.fields.ParentalKey(to='tests.EventPage')),
],
options={
'ordering': [b'sort_order'],
'abstract': False,
},
bases=(models.Model,),
),
migrations.CreateModel(
name='EventPageRelatedLink',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('sort_order', models.IntegerField(null=True, editable=False, blank=True)),
('link_external', models.URLField(verbose_name=b'External link', blank=True)),
('title', models.CharField(help_text=b'Link title', max_length=255)),
('link_document', models.ForeignKey(blank=True, to='wagtaildocs.Document', null=True)),
('link_page', models.ForeignKey(blank=True, to='wagtailcore.Page', null=True)),
('page', modelcluster.fields.ParentalKey(to='tests.EventPage')),
],
options={
'ordering': [b'sort_order'],
'abstract': False,
},
bases=(models.Model,),
),
migrations.CreateModel(
name='EventPageSpeaker',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('sort_order', models.IntegerField(null=True, editable=False, blank=True)),
('link_external', models.URLField(verbose_name=b'External link', blank=True)),
('first_name', models.CharField(max_length=255, verbose_name=b'Name', blank=True)),
('last_name', models.CharField(max_length=255, verbose_name=b'Surname', blank=True)),
('image', models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to='wagtailimages.Image', null=True)),
('link_document', models.ForeignKey(blank=True, to='wagtaildocs.Document', null=True)),
('link_page', models.ForeignKey(blank=True, to='wagtailcore.Page', null=True)),
('page', modelcluster.fields.ParentalKey(to='tests.EventPage')),
],
options={
'ordering': [b'sort_order'],
'abstract': False,
},
bases=(models.Model,),
),
migrations.CreateModel(
name='FormField',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('sort_order', models.IntegerField(null=True, editable=False, blank=True)),
('label', models.CharField(help_text='The label of the form field', max_length=255)),
('field_type', models.CharField(max_length=16, choices=[(b'singleline', 'Single line text'), (b'multiline', 'Multi-line text'), (b'email', 'Email'), (b'number', 'Number'), (b'url', 'URL'), (b'checkbox', 'Checkbox'), (b'checkboxes', 'Checkboxes'), (b'dropdown', 'Drop down'), (b'radio', 'Radio buttons'), (b'date', 'Date'), (b'datetime', 'Date/time')])),
('required', models.BooleanField(default=True)),
('choices', models.CharField(help_text='Comma seperated list of choices. Only applicable in checkboxes, radio and dropdown.', max_length=512, blank=True)),
('default_value', models.CharField(help_text='Default value. Comma seperated values supported for checkboxes.', max_length=255, blank=True)),
('help_text', models.CharField(max_length=255, blank=True)),
],
options={
'ordering': [b'sort_order'],
'abstract': False,
},
bases=(models.Model,),
),
migrations.CreateModel(
name='FormPage',
fields=[
('page_ptr', models.OneToOneField(auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
('to_address', models.CharField(help_text='Optional - form submissions will be emailed to this address', max_length=255, blank=True)),
('from_address', models.CharField(max_length=255, blank=True)),
('subject', models.CharField(max_length=255, blank=True)),
],
options={
'abstract': False,
},
bases=('wagtailcore.page',),
),
migrations.AddField(
model_name='formfield',
name='page',
field=modelcluster.fields.ParentalKey(to='tests.FormPage'),
preserve_default=True,
),
migrations.CreateModel(
name='PageWithOldStyleRouteMethod',
fields=[
('page_ptr', models.OneToOneField(auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
('content', models.TextField()),
],
options={
'abstract': False,
},
bases=('wagtailcore.page',),
),
migrations.CreateModel(
name='RoutablePageTest',
fields=[
('page_ptr', models.OneToOneField(auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
],
options={
'abstract': False,
},
bases=('wagtailcore.page',),
),
migrations.CreateModel(
name='SearchTest',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('title', models.CharField(max_length=255)),
('content', models.TextField()),
('live', models.BooleanField(default=False)),
('published_date', models.DateField(null=True)),
],
options={
},
bases=(models.Model, wagtail.wagtailsearch.indexed.Indexed),
),
migrations.CreateModel(
name='SearchTestChild',
fields=[
('searchtest_ptr', models.OneToOneField(auto_created=True, primary_key=True, serialize=False, to='tests.SearchTest')),
('subtitle', models.CharField(max_length=255, null=True, blank=True)),
('extra_content', models.TextField()),
],
options={
},
bases=('tests.searchtest',),
),
migrations.CreateModel(
name='SearchTestOldConfig',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
],
options={
},
bases=(models.Model, wagtail.wagtailsearch.indexed.Indexed),
),
migrations.CreateModel(
name='SearchTestOldConfigList',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
],
options={
},
bases=(models.Model, wagtail.wagtailsearch.indexed.Indexed),
),
migrations.CreateModel(
name='SimplePage',
fields=[
('page_ptr', models.OneToOneField(auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
('content', models.TextField()),
],
options={
'abstract': False,
},
bases=('wagtailcore.page',),
),
migrations.CreateModel(
name='StandardChild',
fields=[
('page_ptr', models.OneToOneField(auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
],
options={
'abstract': False,
},
bases=('wagtailcore.page',),
),
migrations.CreateModel(
name='StandardIndex',
fields=[
('page_ptr', models.OneToOneField(auto_created=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
],
options={
'abstract': False,
},
bases=('wagtailcore.page',),
),
migrations.CreateModel(
name='ZuluSnippet',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('text', models.CharField(max_length=255)),
],
options={
},
bases=(models.Model,),
),
]

View file

View file

@ -0,0 +1,104 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
import wagtail.wagtailsearch.indexed
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('auth', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='GroupPagePermission',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('permission_type', models.CharField(max_length=20, choices=[(b'add', b'Add'), (b'edit', b'Edit'), (b'publish', b'Publish')])),
('group', models.ForeignKey(to='auth.Group')),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='Page',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('path', models.CharField(unique=True, max_length=255)),
('depth', models.PositiveIntegerField()),
('numchild', models.PositiveIntegerField(default=0)),
('title', models.CharField(help_text="The page title as you'd like it to be seen by the public", max_length=255)),
('slug', models.SlugField(help_text='The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/')),
('live', models.BooleanField(default=True, editable=False)),
('has_unpublished_changes', models.BooleanField(default=False, editable=False)),
('url_path', models.CharField(max_length=255, editable=False, blank=True)),
('seo_title', models.CharField(help_text="Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.", max_length=255, verbose_name='Page title', blank=True)),
('show_in_menus', models.BooleanField(default=False, help_text='Whether a link to this page will appear in automatically generated menus')),
('search_description', models.TextField(blank=True)),
('go_live_at', models.DateTimeField(help_text='Please add a date-time in the form YYYY-MM-DD hh:mm.', null=True, verbose_name='Go live date/time', blank=True)),
('expire_at', models.DateTimeField(help_text='Please add a date-time in the form YYYY-MM-DD hh:mm.', null=True, verbose_name='Expiry date/time', blank=True)),
('expired', models.BooleanField(default=False, editable=False)),
('content_type', models.ForeignKey(to='contenttypes.ContentType')),
('owner', models.ForeignKey(blank=True, editable=False, to=settings.AUTH_USER_MODEL, null=True)),
],
options={
'abstract': False,
},
bases=(models.Model, wagtail.wagtailsearch.indexed.Indexed),
),
migrations.AddField(
model_name='grouppagepermission',
name='page',
field=models.ForeignKey(to='wagtailcore.Page'),
preserve_default=True,
),
migrations.CreateModel(
name='PageRevision',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('submitted_for_moderation', models.BooleanField(default=False)),
('created_at', models.DateTimeField(auto_now_add=True)),
('content_json', models.TextField()),
('approved_go_live_at', models.DateTimeField(null=True, blank=True)),
('page', models.ForeignKey(to='wagtailcore.Page')),
('user', models.ForeignKey(blank=True, to=settings.AUTH_USER_MODEL, null=True)),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='PageViewRestriction',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('password', models.CharField(max_length=255)),
('page', models.ForeignKey(to='wagtailcore.Page')),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='Site',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('hostname', models.CharField(max_length=255, db_index=True)),
('port', models.IntegerField(default=80, help_text='Set this to something other than 80 if you need a specific port number to appear in URLs (e.g. development on port 8000). Does not affect request handling (so port forwarding still works).')),
('is_default_site', models.BooleanField(default=False, help_text='If true, this site will handle requests for all other hostnames that do not have a site entry of their own')),
('root_page', models.ForeignKey(to='wagtailcore.Page')),
],
options={
},
bases=(models.Model,),
),
migrations.AlterUniqueTogether(
name='site',
unique_together=set([(b'hostname', b'port')]),
),
]

View file

@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
import taggit.models
import wagtail.wagtailadmin.taggable
import taggit.managers
class Migration(migrations.Migration):
dependencies = [
('taggit', '__latest__'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Document',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('title', models.CharField(max_length=255, verbose_name='Title')),
('file', models.FileField(upload_to=b'documents', verbose_name='File')),
('created_at', models.DateTimeField(auto_now_add=True)),
('tags', taggit.managers.TaggableManager(to=taggit.models.Tag, through=taggit.models.TaggedItem, blank=True, help_text=None, verbose_name='Tags')),
('uploaded_by_user', models.ForeignKey(blank=True, editable=False, to=settings.AUTH_USER_MODEL, null=True)),
],
options={
},
bases=(models.Model, wagtail.wagtailadmin.taggable.TagSearchable),
),
]

View file

@ -0,0 +1,37 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Embed',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('url', models.URLField()),
('max_width', models.SmallIntegerField(null=True, blank=True)),
('type', models.CharField(max_length=10, choices=[(b'video', b'Video'), (b'photo', b'Photo'), (b'link', b'Link'), (b'rich', b'Rich')])),
('html', models.TextField(blank=True)),
('title', models.TextField(blank=True)),
('author_name', models.TextField(blank=True)),
('provider_name', models.TextField(blank=True)),
('thumbnail_url', models.URLField(null=True, blank=True)),
('width', models.IntegerField(null=True, blank=True)),
('height', models.IntegerField(null=True, blank=True)),
('last_updated', models.DateTimeField(auto_now=True)),
],
options={
},
bases=(models.Model,),
),
migrations.AlterUniqueTogether(
name='embed',
unique_together=set([(b'url', b'max_width')]),
),
]

View file

@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('wagtailcore', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='FormSubmission',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('form_data', models.TextField()),
('submit_time', models.DateTimeField(auto_now_add=True)),
('page', models.ForeignKey(to='wagtailcore.Page')),
],
options={
},
bases=(models.Model,),
),
]

View file

@ -0,0 +1,66 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import taggit.models
import wagtail.wagtailimages.models
import wagtail.wagtailimages.utils
import wagtail.wagtailadmin.taggable
from django.conf import settings
import taggit.managers
class Migration(migrations.Migration):
dependencies = [
('taggit', '__latest__'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Filter',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('spec', models.CharField(max_length=255, db_index=True)),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='Image',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('title', models.CharField(max_length=255, verbose_name='Title')),
('file', models.ImageField(upload_to=wagtail.wagtailimages.models.get_upload_to, width_field=b'width', height_field=b'height', validators=[wagtail.wagtailimages.utils.validate_image_format], verbose_name='File')),
('width', models.IntegerField(editable=False)),
('height', models.IntegerField(editable=False)),
('created_at', models.DateTimeField(auto_now_add=True)),
('tags', taggit.managers.TaggableManager(to=taggit.models.Tag, through=taggit.models.TaggedItem, blank=True, help_text=None, verbose_name='Tags')),
('uploaded_by_user', models.ForeignKey(blank=True, editable=False, to=settings.AUTH_USER_MODEL, null=True)),
],
options={
'abstract': False,
},
bases=(models.Model, wagtail.wagtailadmin.taggable.TagSearchable),
),
migrations.CreateModel(
name='Rendition',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('file', models.ImageField(height_field=b'height', width_field=b'width', upload_to=b'images')),
('width', models.IntegerField(editable=False)),
('height', models.IntegerField(editable=False)),
('filter', models.ForeignKey(to='wagtailimages.Filter')),
('image', models.ForeignKey(to='wagtailimages.Image')),
],
options={
},
bases=(models.Model,),
),
migrations.AlterUniqueTogether(
name='rendition',
unique_together=set([(b'image', b'filter')]),
),
]

View file

@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('wagtailcore', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Redirect',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('old_path', models.CharField(unique=True, max_length=255, verbose_name='Redirect from', db_index=True)),
('is_permanent', models.BooleanField(default=True, help_text="Recommended. Permanent redirects ensure search engines forget the old page (the 'Redirect from') and index the new page instead.", verbose_name='Permanent')),
('redirect_link', models.URLField(verbose_name='Redirect to any URL', blank=True)),
('redirect_page', models.ForeignKey(verbose_name='Redirect to a page', blank=True, to='wagtailcore.Page', null=True)),
('site', models.ForeignKey(blank=True, editable=False, to='wagtailcore.Site', null=True)),
],
options={
},
bases=(models.Model,),
),
]

View file

@ -0,0 +1,59 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('wagtailcore', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='EditorsPick',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('sort_order', models.IntegerField(null=True, editable=False, blank=True)),
('description', models.TextField(blank=True)),
('page', models.ForeignKey(to='wagtailcore.Page')),
],
options={
'ordering': (b'sort_order',),
},
bases=(models.Model,),
),
migrations.CreateModel(
name='Query',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('query_string', models.CharField(unique=True, max_length=255)),
],
options={
},
bases=(models.Model,),
),
migrations.AddField(
model_name='editorspick',
name='query',
field=models.ForeignKey(to='wagtailsearch.Query'),
preserve_default=True,
),
migrations.CreateModel(
name='QueryDailyHits',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('date', models.DateField()),
('hits', models.IntegerField(default=0)),
('query', models.ForeignKey(to='wagtailsearch.Query')),
],
options={
},
bases=(models.Model,),
),
migrations.AlterUniqueTogether(
name='querydailyhits',
unique_together=set([(b'query', b'date')]),
),
]

View file

@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='UserProfile',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('submitted_notifications', models.BooleanField(default=True, help_text='Receive notification when a page is submitted for moderation')),
('approved_notifications', models.BooleanField(default=True, help_text='Receive notification when your page edit is approved')),
('rejected_notifications', models.BooleanField(default=True, help_text='Receive notification when your page edit is rejected')),
('user', models.OneToOneField(to=settings.AUTH_USER_MODEL)),
],
options={
},
bases=(models.Model,),
),
]