diff --git a/.travis.yml b/.travis.yml
index f54d1392e..8adb9d493 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,15 +1,8 @@
language: python
env:
-# - TOXENV=py26-dj16-postgres
- - TOXENV=py26-dj16-sqlite
- - TOXENV=py27-dj16-postgres
-# - TOXENV=py27-dj16-sqlite
- - TOXENV=py32-dj16-postgres
-# - TOXENV=py33-dj16-postgres
- - TOXENV=py34-dj16-postgres
- TOXENV=py27-dj17-postgres
-# - TOXENV=py27-dj17-sqlite
-# - TOXENV=py32-dj17-postgres
+ - TOXENV=py27-dj17-sqlite
+ - TOXENV=py32-dj17-postgres
# - TOXENV=py33-dj17-postgres
- TOXENV=py34-dj17-postgres
diff --git a/README.rst b/README.rst
index 3135da3ea..7a725c4dc 100644
--- a/README.rst
+++ b/README.rst
@@ -52,7 +52,7 @@ Available at `wagtail.readthedocs.org `_ and al
Compatibility
~~~~~~~~~~~~~
-Wagtail supports Django 1.6.2+ and 1.7.0+ on Python 2.6, 2.7, 3.2, 3.3 and 3.4.
+Wagtail supports Django 1.7.0+ on Python 2.7, 3.2, 3.3 and 3.4.
Wagtail's dependencies are summarised at `requirements.io `_.
diff --git a/docs/index.rst b/docs/index.rst
index 05b7812b8..8533cf42b 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -3,7 +3,7 @@ Welcome to Wagtail's documentation
Wagtail is a modern, flexible CMS, built on Django.
-It supports Django 1.6.2+ and 1.7rc3+ on Python 2.6, 2.7, 3.2, 3.3 and 3.4.
+It supports Django 1.7.0+ on Python 2.7, 3.2, 3.3 and 3.4.
.. toctree::
:maxdepth: 3
diff --git a/setup.py b/setup.py
index 1bf7dbf37..b5654c7cc 100644
--- a/setup.py
+++ b/setup.py
@@ -28,8 +28,7 @@ PY3 = sys.version_info[0] == 3
install_requires = [
- "Django>=1.6.2,<1.8",
- "South>=1.0.0",
+ "Django>=1.7.0,<1.8",
"django-compressor>=1.4",
"django-libsass>=0.2",
"django-modelcluster>=0.4",
@@ -69,7 +68,6 @@ setup(
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
- 'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
diff --git a/tox.ini b/tox.ini
index 5dc3d9ea1..b91f00b3c 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,5 @@
[deps]
base =
- South==1.0.0
django-compressor>=1.4
django-libsass>=0.2
libsass==0.5.1
@@ -20,10 +19,6 @@ base =
Embedly
coverage
-dj16 =
- Django>=1.6,<1.7
-
-
dj17 =
Django>=1.7,<1.8
@@ -38,14 +33,6 @@ skipsdist = True
usedevelop = True
envlist =
- py26-dj16-postgres,
- py26-dj16-sqlite,
- py27-dj16-postgres,
- py27-dj16-sqlite,
- py32-dj16-postgres,
- py33-dj16-postgres,
- py34-dj16-postgres,
-
py27-dj17-postgres,
py27-dj17-sqlite,
py32-dj17-postgres,
@@ -61,131 +48,10 @@ envlist =
# py26-dj16-mysql
# py27-dj16-mysql
-# South fails with sqlite on python3, because it tries to use DryRunMigrator which uses iteritems
-# py32-dj16-sqlite,
-# py33-dj16-sqlite,
-# py34-dj16-sqlite
-
[testenv]
commands=coverage run runtests.py
-[testenv:py26-dj16-postgres]
-basepython=python2.6
-deps =
- {[deps]base}
- {[deps]py2}
- {[deps]dj16}
- psycopg2==2.5.3
-setenv =
- DATABASE_ENGINE=django.db.backends.postgresql_psycopg2
-
-[testenv:py26-dj16-sqlite]
-basepython=python2.6
-deps =
- {[deps]base}
- {[deps]py2}
- {[deps]dj16}
-setenv =
- DATABASE_ENGINE=django.db.backends.sqlite3
-
-[testenv:py26-dj16-mysql]
-basepython=python2.6
-deps =
- {[deps]base}
- {[deps]py2}
- {[deps]dj16}
- MySQL-python==1.2.5
-setenv =
- DATABASE_ENGINE=django.db.backends.mysql
- DATABASE_USER=wagtail
-
-[testenv:py27-dj16-postgres]
-basepython=python2.7
-deps =
- {[deps]base}
- {[deps]py2}
- {[deps]dj16}
- psycopg2==2.5.3
-setenv =
- DATABASE_ENGINE=django.db.backends.postgresql_psycopg2
-
-[testenv:py27-dj16-sqlite]
-basepython=python2.7
-deps =
- {[deps]base}
- {[deps]py2}
- {[deps]dj16}
-setenv =
- DATABASE_ENGINE=django.db.backends.sqlite3
-
-[testenv:py27-dj16-mysql]
-basepython=python2.7
-deps =
- {[deps]base}
- {[deps]py2}
- {[deps]dj16}
- MySQL-python==1.2.5
-setenv =
- DATABASE_ENGINE=django.db.backends.mysql
- DATABASE_USER=wagtail
-
-[testenv:py32-dj16-postgres]
-basepython=python3.2
-deps =
- {[deps]base}
- {[deps]py3}
- {[deps]dj16}
- psycopg2==2.5.3
-setenv =
- DATABASE_ENGINE=django.db.backends.postgresql_psycopg2
-
-[testenv:py32-dj16-sqlite]
-basepython=python3.2
-deps =
- {[deps]base}
- {[deps]py3}
- {[deps]dj16}
-setenv =
- DATABASE_ENGINE=django.db.backends.sqlite3
-
-[testenv:py33-dj16-postgres]
-basepython=python3.3
-deps =
- {[deps]base}
- {[deps]py3}
- {[deps]dj16}
- psycopg2==2.5.3
-setenv =
- DATABASE_ENGINE=django.db.backends.postgresql_psycopg2
-
-[testenv:py33-dj16-sqlite]
-basepython=python3.3
-deps =
- {[deps]base}
- {[deps]py3}
- {[deps]dj16}
-setenv =
- DATABASE_ENGINE=django.db.backends.sqlite3
-
-[testenv:py34-dj16-postgres]
-basepython=python3.4
-deps =
- {[deps]base}
- {[deps]py3}
- {[deps]dj16}
- psycopg2==2.5.3
-setenv =
- DATABASE_ENGINE=django.db.backends.postgresql_psycopg2
-
-[testenv:py34-dj16-sqlite]
-basepython=python3.4
-deps =
- {[deps]base}
- {[deps]py3}
- {[deps]dj16}
-setenv =
- DATABASE_ENGINE=django.db.backends.sqlite3
[testenv:py27-dj17-postgres]
basepython=python2.7
diff --git a/wagtail/contrib/wagtailfrontendcache/utils.py b/wagtail/contrib/wagtailfrontendcache/utils.py
index 18d57afd4..8f0217bfb 100644
--- a/wagtail/contrib/wagtailfrontendcache/utils.py
+++ b/wagtail/contrib/wagtailfrontendcache/utils.py
@@ -1,15 +1,8 @@
import logging
-try:
- from importlib import import_module
-except ImportError:
- # for Python 2.6, fall back on django.utils.importlib (deprecated as of Django 1.7)
- from django.utils.importlib import import_module
-
-import sys
-
from django.utils import six
from django.conf import settings
+from django.utils.module_loading import import_string
from django.core.exceptions import ImproperlyConfigured
@@ -20,30 +13,6 @@ class InvalidFrontendCacheBackendError(ImproperlyConfigured):
pass
-# Pinched from django 1.7 source code.
-# TODO: Replace this with "from django.utils.module_loading import import_string"
-# when django 1.7 is released
-def import_string(dotted_path):
- """
- Import a dotted module path and return the attribute/class designated by the
- last name in the path. Raise ImportError if the import failed.
- """
- try:
- module_path, class_name = dotted_path.rsplit('.', 1)
- except ValueError:
- msg = "%s doesn't look like a module path" % dotted_path
- six.reraise(ImportError, ImportError(msg), sys.exc_info()[2])
-
- module = import_module(module_path)
-
- try:
- return getattr(module, class_name)
- except AttributeError:
- msg = 'Module "%s" does not define a "%s" attribute/class' % (
- dotted_path, class_name)
- six.reraise(ImportError, ImportError(msg), sys.exc_info()[2])
-
-
def get_backends(backend_settings=None, backends=None):
# Get backend settings from WAGTAILFRONTENDCACHE setting
if backend_settings is None:
diff --git a/wagtail/tests/settings.py b/wagtail/tests/settings.py
index 55141565b..1d40d2475 100644
--- a/wagtail/tests/settings.py
+++ b/wagtail/tests/settings.py
@@ -1,6 +1,5 @@
import os
-import django
from django.conf import global_settings
@@ -79,25 +78,12 @@ INSTALLED_APPS = [
'wagtail.tests',
]
-# If we are using Django 1.6, add South to INSTALLED_APPS
-if django.VERSION < (1, 7):
- INSTALLED_APPS.append('south')
-
-# If we are using Django 1.7 install wagtailredirects with its appconfig
+# Install wagtailredirects with its appconfig
# Theres nothing special about wagtailredirects, we just need to have one
# app which uses AppConfigs to test that hooks load properly
-if django.VERSION < (1, 7):
- INSTALLED_APPS.append('wagtail.wagtailredirects')
-else:
- INSTALLED_APPS.append('wagtail.wagtailredirects.apps.WagtailRedirectsAppConfig')
-
-# As we don't have south migrations for tests, South thinks
-# the Django 1.7 migrations are South migrations.
-SOUTH_MIGRATION_MODULES = {
- 'tests': 'ignore',
-}
+INSTALLED_APPS.append('wagtail.wagtailredirects.apps.WagtailRedirectsAppConfig')
# Using DatabaseCache to make sure that the cache is cleared between tests.
diff --git a/wagtail/tests/utils.py b/wagtail/tests/utils.py
index 4d8f89524..e5a9cbbdf 100644
--- a/wagtail/tests/utils.py
+++ b/wagtail/tests/utils.py
@@ -5,17 +5,6 @@ import threading
from django.contrib.auth import get_user_model
from django.utils import six
-# We need to make sure that we're using the same unittest library that Django uses internally
-# Otherwise, we get issues with the "SkipTest" and "ExpectedFailure" exceptions being recognised as errors
-try:
- # Firstly, try to import unittest from Django
- from django.utils import unittest
-except ImportError:
- # Django doesn't include unittest
- # We must be running on Django 1.7+ which doesn't support Python 2.6 so
- # the standard unittest library should be unittest2
- import unittest
-
class WagtailTestUtils(object):
def login(self):
diff --git a/wagtail/utils/apps.py b/wagtail/utils/apps.py
index 2bee7484e..cd6f17c2f 100644
--- a/wagtail/utils/apps.py
+++ b/wagtail/utils/apps.py
@@ -1,11 +1,6 @@
-try:
- from importlib import import_module
-except ImportError:
- # for Python 2.6, fall back on django.utils.importlib (deprecated as of Django 1.7)
- from django.utils.importlib import import_module
+from importlib import import_module
-import django
-from django.conf import settings
+from django.apps import apps
from django.utils.module_loading import module_has_submodule
@@ -14,15 +9,8 @@ def get_app_modules():
Generator function that yields a module object for each installed app
yields tuples of (app_name, module)
"""
- if django.VERSION < (1, 7):
- # Django 1.6
- for app in settings.INSTALLED_APPS:
- yield app, import_module(app)
- else:
- # Django 1.7+
- from django.apps import apps
- for app in apps.get_app_configs():
- yield app.name, app.module
+ for app in apps.get_app_configs():
+ yield app.name, app.module
def get_app_submodules(submodule_name):
diff --git a/wagtail/wagtailadmin/south_migrations/0001_create_admin_access_permissions.py b/wagtail/wagtailadmin/south_migrations/0001_create_admin_access_permissions.py
deleted file mode 100644
index 44a6c1b62..000000000
--- a/wagtail/wagtailadmin/south_migrations/0001_create_admin_access_permissions.py
+++ /dev/null
@@ -1,60 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import DataMigration
-from django.db import models, connection
-from django.db.transaction import set_autocommit
-
-class Migration(DataMigration):
-
- depends_on = (
- ("wagtailcore", "0002_initial_data"),
- )
-
- def forwards(self, orm):
- if connection.vendor == 'sqlite':
- set_autocommit(True)
-
- # Add a fake content type to hang the 'can access Wagtail admin' permission off.
- # The fact that this doesn't correspond to an actual defined model shouldn't matter, I hope...
- wagtailadmin_content_type = orm['contenttypes.ContentType'].objects.create(
- app_label='wagtailadmin', model='admin', name='Wagtail admin')
- admin_permission = orm['auth.permission'].objects.create(
- content_type=wagtailadmin_content_type, codename='access_admin', name='Can access Wagtail admin')
-
- for group in orm['auth.group'].objects.filter(name__in=['Editors', 'Moderators']):
- group.permissions.add(admin_permission)
-
- def backwards(self, orm):
- wagtailadmin_content_type = orm['contenttypes.ContentType'].objects.get(
- app_label='wagtailadmin', model='admin')
- orm['auth.Permission'].objects.filter(content_type=wagtailadmin_content_type).delete()
- wagtailadmin_content_type.delete()
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- },
- }
-
- complete_apps = ['wagtailadmin']
- symmetrical = True
diff --git a/wagtail/wagtailadmin/south_migrations/__init__.py b/wagtail/wagtailadmin/south_migrations/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/wagtail/wagtailadmin/tests/test_pages_views.py b/wagtail/wagtailadmin/tests/test_pages_views.py
index ccfa67187..a02846ce0 100644
--- a/wagtail/wagtailadmin/tests/test_pages_views.py
+++ b/wagtail/wagtailadmin/tests/test_pages_views.py
@@ -1,4 +1,5 @@
from datetime import timedelta
+import unittest
from django.test import TestCase
from django.core.urlresolvers import reverse
@@ -13,7 +14,7 @@ from wagtail.tests.models import (
StandardIndex, StandardChild,
BusinessIndex, BusinessChild, BusinessSubIndex,
TaggedPage, Advert, AdvertPlacement)
-from wagtail.tests.utils import unittest, WagtailTestUtils
+from wagtail.tests.utils import WagtailTestUtils
from wagtail.wagtailcore.models import Page, PageRevision
from wagtail.wagtailcore.signals import page_published, page_unpublished
from wagtail.wagtailusers.models import UserProfile
diff --git a/wagtail/wagtailcore/south_migrations/0001_initial.py b/wagtail/wagtailcore/south_migrations/0001_initial.py
deleted file mode 100644
index 31af299fc..000000000
--- a/wagtail/wagtailcore/south_migrations/0001_initial.py
+++ /dev/null
@@ -1,159 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-from wagtail.wagtailcore.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME
-
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
- # Adding model 'Site'
- db.create_table('wagtailcore_site', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('hostname', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255, db_index=True)),
- ('port', self.gf('django.db.models.fields.IntegerField')(default=80)),
- ('root_page', self.gf('django.db.models.fields.related.ForeignKey')(related_name='sites_rooted_here', to=orm['wagtailcore.Page'])),
- ('is_default_site', self.gf('django.db.models.fields.BooleanField')(default=False)),
- ))
- db.send_create_signal('wagtailcore', ['Site'])
-
- # Adding model 'Page'
- db.create_table('wagtailcore_page', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('path', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
- ('depth', self.gf('django.db.models.fields.PositiveIntegerField')()),
- ('numchild', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
- ('title', self.gf('django.db.models.fields.CharField')(max_length=255)),
- ('slug', self.gf('django.db.models.fields.SlugField')(max_length=50)),
- ('content_type', self.gf('django.db.models.fields.related.ForeignKey')(related_name='pages', to=orm['contenttypes.ContentType'])),
- ('live', self.gf('django.db.models.fields.BooleanField')(default=True)),
- ('has_unpublished_changes', self.gf('django.db.models.fields.BooleanField')(default=False)),
- ('url_path', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)),
- ('owner', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='owned_pages', null=True, to=orm[AUTH_USER_MODEL])),
- ('seo_title', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)),
- ('show_in_menus', self.gf('django.db.models.fields.BooleanField')(default=False)),
- ('search_description', self.gf('django.db.models.fields.TextField')(blank=True)),
- ))
- db.send_create_signal('wagtailcore', ['Page'])
-
- # Adding model 'PageRevision'
- db.create_table('wagtailcore_pagerevision', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('page', self.gf('django.db.models.fields.related.ForeignKey')(related_name='revisions', to=orm['wagtailcore.Page'])),
- ('submitted_for_moderation', self.gf('django.db.models.fields.BooleanField')(default=False)),
- ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
- ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm[AUTH_USER_MODEL], null=True, blank=True)),
- ('content_json', self.gf('django.db.models.fields.TextField')()),
- ))
- db.send_create_signal('wagtailcore', ['PageRevision'])
-
- # Adding model 'GroupPagePermission'
- db.create_table('wagtailcore_grouppagepermission', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('group', self.gf('django.db.models.fields.related.ForeignKey')(related_name='page_permissions', to=orm['auth.Group'])),
- ('page', self.gf('django.db.models.fields.related.ForeignKey')(related_name='group_permissions', to=orm['wagtailcore.Page'])),
- ('permission_type', self.gf('django.db.models.fields.CharField')(max_length=20)),
- ))
- db.send_create_signal('wagtailcore', ['GroupPagePermission'])
-
-
- def backwards(self, orm):
- # Deleting model 'Site'
- db.delete_table('wagtailcore_site')
-
- # Deleting model 'Page'
- db.delete_table('wagtailcore_page')
-
- # Deleting model 'PageRevision'
- db.delete_table('wagtailcore_pagerevision')
-
- # Deleting model 'GroupPagePermission'
- db.delete_table('wagtailcore_grouppagepermission')
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- AUTH_USER_MODEL: {
- 'Meta': {'object_name': AUTH_USER_MODEL_NAME},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Permission']"}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- },
- 'wagtailcore.grouppagepermission': {
- 'Meta': {'object_name': 'GroupPagePermission'},
- 'group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'page_permissions'", 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'group_permissions'", 'to': "orm['wagtailcore.Page']"}),
- 'permission_type': ('django.db.models.fields.CharField', [], {'max_length': '20'})
- },
- 'wagtailcore.page': {
- 'Meta': {'object_name': 'Page'},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['contenttypes.ContentType']"}),
- 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}),
- 'has_unpublished_changes': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'live': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
- 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'owned_pages'", 'null': 'True', 'to': "orm['%s']" % AUTH_USER_MODEL}),
- 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'search_description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'seo_title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
- 'show_in_menus': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'url_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
- },
- 'wagtailcore.pagerevision': {
- 'Meta': {'object_name': 'PageRevision'},
- 'content_json': ('django.db.models.fields.TextField', [], {}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'revisions'", 'to': "orm['wagtailcore.Page']"}),
- 'submitted_for_moderation': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['%s']" % AUTH_USER_MODEL, 'null': 'True', 'blank': 'True'})
- },
- 'wagtailcore.site': {
- 'Meta': {'object_name': 'Site'},
- 'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_default_site': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'port': ('django.db.models.fields.IntegerField', [], {'default': '80'}),
- 'root_page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sites_rooted_here'", 'to': "orm['wagtailcore.Page']"})
- }
- }
-
- complete_apps = ['wagtailcore']
\ No newline at end of file
diff --git a/wagtail/wagtailcore/south_migrations/0002_initial_data.py b/wagtail/wagtailcore/south_migrations/0002_initial_data.py
deleted file mode 100644
index bb0b5f3b9..000000000
--- a/wagtail/wagtailcore/south_migrations/0002_initial_data.py
+++ /dev/null
@@ -1,146 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import DataMigration
-from django.db import models, connection
-from django.db.transaction import set_autocommit
-
-from wagtail.wagtailcore.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME
-
-
-class Migration(DataMigration):
-
- def forwards(self, orm):
- if connection.vendor == 'sqlite':
- set_autocommit(True)
- page_content_type, created = orm['contenttypes.contenttype'].objects.get_or_create(
- model='page', app_label='wagtailcore', defaults={'name': 'page'})
-
- root = orm['wagtailcore.page'].objects.create(
- title="Root",
- slug='root',
- content_type=page_content_type,
- path='0001',
- depth=1,
- numchild=1,
- url_path='/',
- )
-
- homepage = orm['wagtailcore.page'].objects.create(
- title="Welcome to your new Wagtail site!",
- slug='home',
- content_type=page_content_type,
- path='00010001',
- depth=2,
- numchild=0,
- url_path='/home/',
- )
-
- orm['wagtailcore.site'].objects.create(
- hostname='localhost', root_page=homepage, is_default_site=True)
-
- editors_group = orm['auth.group'].objects.create(name='Editors')
- moderators_group = orm['auth.group'].objects.create(name='Moderators')
-
- orm['wagtailcore.grouppagepermission'].objects.create(
- group=moderators_group, page=root, permission_type='add')
- orm['wagtailcore.grouppagepermission'].objects.create(
- group=moderators_group, page=root, permission_type='edit')
- orm['wagtailcore.grouppagepermission'].objects.create(
- group=moderators_group, page=root, permission_type='publish')
-
- orm['wagtailcore.grouppagepermission'].objects.create(
- group=editors_group, page=root, permission_type='add')
- orm['wagtailcore.grouppagepermission'].objects.create(
- group=editors_group, page=root, permission_type='edit')
-
-
- def backwards(self, orm):
- orm['auth.group'].objects.filter(name__in=('Editors', 'Moderators')).delete()
- orm['wagtailcore.site'].objects.all().delete()
- orm['wagtailcore.page'].objects.all().delete()
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- AUTH_USER_MODEL: {
- 'Meta': {'object_name': AUTH_USER_MODEL_NAME},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Permission']"}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- },
- 'wagtailcore.grouppagepermission': {
- 'Meta': {'object_name': 'GroupPagePermission'},
- 'group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'page_permissions'", 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'group_permissions'", 'to': "orm['wagtailcore.Page']"}),
- 'permission_type': ('django.db.models.fields.CharField', [], {'max_length': '20'})
- },
- 'wagtailcore.page': {
- 'Meta': {'object_name': 'Page'},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['contenttypes.ContentType']"}),
- 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}),
- 'has_unpublished_changes': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'live': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
- 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'owned_pages'", 'null': 'True', 'to': "orm['%s']" % AUTH_USER_MODEL}),
- 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'search_description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'seo_title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
- 'show_in_menus': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'url_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
- },
- 'wagtailcore.pagerevision': {
- 'Meta': {'object_name': 'PageRevision'},
- 'content_json': ('django.db.models.fields.TextField', [], {}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'revisions'", 'to': "orm['wagtailcore.Page']"}),
- 'submitted_for_moderation': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['%s']" % AUTH_USER_MODEL, 'null': 'True', 'blank': 'True'})
- },
- 'wagtailcore.site': {
- 'Meta': {'object_name': 'Site'},
- 'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_default_site': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'port': ('django.db.models.fields.IntegerField', [], {'default': '80'}),
- 'root_page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sites_rooted_here'", 'to': "orm['wagtailcore.Page']"})
- }
- }
-
- complete_apps = ['wagtailcore']
- symmetrical = True
diff --git a/wagtail/wagtailcore/south_migrations/0003_auto__del_unique_site_hostname__add_unique_site_hostname_port.py b/wagtail/wagtailcore/south_migrations/0003_auto__del_unique_site_hostname__add_unique_site_hostname_port.py
deleted file mode 100644
index a7060ddc7..000000000
--- a/wagtail/wagtailcore/south_migrations/0003_auto__del_unique_site_hostname__add_unique_site_hostname_port.py
+++ /dev/null
@@ -1,108 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
- # Removing unique constraint on 'Site', fields ['hostname']
- db.delete_unique('wagtailcore_site', ['hostname'])
-
- # Adding unique constraint on 'Site', fields ['hostname', 'port']
- db.create_unique('wagtailcore_site', ['hostname', 'port'])
-
-
- def backwards(self, orm):
- # Removing unique constraint on 'Site', fields ['hostname', 'port']
- db.delete_unique('wagtailcore_site', ['hostname', 'port'])
-
- # Adding unique constraint on 'Site', fields ['hostname']
- db.create_unique('wagtailcore_site', ['hostname'])
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Permission']"}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- },
- 'wagtailcore.grouppagepermission': {
- 'Meta': {'object_name': 'GroupPagePermission'},
- 'group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'page_permissions'", 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'group_permissions'", 'to': "orm['wagtailcore.Page']"}),
- 'permission_type': ('django.db.models.fields.CharField', [], {'max_length': '20'})
- },
- 'wagtailcore.page': {
- 'Meta': {'object_name': 'Page'},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['contenttypes.ContentType']"}),
- 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}),
- 'has_unpublished_changes': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'live': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
- 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'owned_pages'", 'null': 'True', 'to': "orm['auth.User']"}),
- 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'search_description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'seo_title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
- 'show_in_menus': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'url_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
- },
- 'wagtailcore.pagerevision': {
- 'Meta': {'object_name': 'PageRevision'},
- 'content_json': ('django.db.models.fields.TextField', [], {}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'revisions'", 'to': "orm['wagtailcore.Page']"}),
- 'submitted_for_moderation': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'})
- },
- 'wagtailcore.site': {
- 'Meta': {'unique_together': "(('hostname', 'port'),)", 'object_name': 'Site'},
- 'hostname': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_default_site': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'port': ('django.db.models.fields.IntegerField', [], {'default': '80'}),
- 'root_page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sites_rooted_here'", 'to': "orm['wagtailcore.Page']"})
- }
- }
-
- complete_apps = ['wagtailcore']
\ No newline at end of file
diff --git a/wagtail/wagtailcore/south_migrations/0004_fields_for_scheduled_publishing.py b/wagtail/wagtailcore/south_migrations/0004_fields_for_scheduled_publishing.py
deleted file mode 100644
index 9d53df617..000000000
--- a/wagtail/wagtailcore/south_migrations/0004_fields_for_scheduled_publishing.py
+++ /dev/null
@@ -1,132 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
- # Adding field 'PageRevision.approved_go_live_at'
- db.add_column('wagtailcore_pagerevision', 'approved_go_live_at',
- self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True),
- keep_default=False)
-
- # Adding field 'Page.go_live_at'
- db.add_column('wagtailcore_page', 'go_live_at',
- self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True),
- keep_default=False)
-
- # Adding field 'Page.expire_at'
- db.add_column('wagtailcore_page', 'expire_at',
- self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True),
- keep_default=False)
-
- # Adding field 'Page.expired'
- db.add_column('wagtailcore_page', 'expired',
- self.gf('django.db.models.fields.BooleanField')(default=False),
- keep_default=False)
-
-
- def backwards(self, orm):
- # Deleting field 'PageRevision.approved_go_live_at'
- db.delete_column('wagtailcore_pagerevision', 'approved_go_live_at')
-
- # Deleting field 'Page.go_live_at'
- db.delete_column('wagtailcore_page', 'go_live_at')
-
- # Deleting field 'Page.expire_at'
- db.delete_column('wagtailcore_page', 'expire_at')
-
- # Deleting field 'Page.expired'
- db.delete_column('wagtailcore_page', 'expired')
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Permission']"}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- },
- 'wagtailcore.grouppagepermission': {
- 'Meta': {'object_name': 'GroupPagePermission'},
- 'group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'page_permissions'", 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'group_permissions'", 'to': "orm['wagtailcore.Page']"}),
- 'permission_type': ('django.db.models.fields.CharField', [], {'max_length': '20'})
- },
- 'wagtailcore.page': {
- 'Meta': {'object_name': 'Page'},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['contenttypes.ContentType']"}),
- 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}),
- 'expire_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
- 'expired': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'go_live_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
- 'has_unpublished_changes': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'live': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
- 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'owned_pages'", 'null': 'True', 'to': "orm['auth.User']"}),
- 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'search_description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'seo_title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
- 'show_in_menus': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'url_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
- },
- 'wagtailcore.pagerevision': {
- 'Meta': {'object_name': 'PageRevision'},
- 'approved_go_live_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
- 'content_json': ('django.db.models.fields.TextField', [], {}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'revisions'", 'to': "orm['wagtailcore.Page']"}),
- 'submitted_for_moderation': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'})
- },
- 'wagtailcore.site': {
- 'Meta': {'unique_together': "(('hostname', 'port'),)", 'object_name': 'Site'},
- 'hostname': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_default_site': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'port': ('django.db.models.fields.IntegerField', [], {'default': '80'}),
- 'root_page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sites_rooted_here'", 'to': "orm['wagtailcore.Page']"})
- }
- }
-
- complete_apps = ['wagtailcore']
\ No newline at end of file
diff --git a/wagtail/wagtailcore/south_migrations/0005_create_page_view_restriction.py b/wagtail/wagtailcore/south_migrations/0005_create_page_view_restriction.py
deleted file mode 100644
index f2d79573f..000000000
--- a/wagtail/wagtailcore/south_migrations/0005_create_page_view_restriction.py
+++ /dev/null
@@ -1,117 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
- # Adding model 'PageViewRestriction'
- db.create_table('wagtailcore_pageviewrestriction', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('page', self.gf('django.db.models.fields.related.ForeignKey')(related_name='view_restrictions', to=orm['wagtailcore.Page'])),
- ('password', self.gf('django.db.models.fields.CharField')(max_length=255)),
- ))
- db.send_create_signal('wagtailcore', ['PageViewRestriction'])
-
-
- def backwards(self, orm):
- # Deleting model 'PageViewRestriction'
- db.delete_table('wagtailcore_pageviewrestriction')
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Permission']"}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- },
- 'wagtailcore.grouppagepermission': {
- 'Meta': {'object_name': 'GroupPagePermission'},
- 'group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'page_permissions'", 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'group_permissions'", 'to': "orm['wagtailcore.Page']"}),
- 'permission_type': ('django.db.models.fields.CharField', [], {'max_length': '20'})
- },
- 'wagtailcore.page': {
- 'Meta': {'object_name': 'Page'},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['contenttypes.ContentType']"}),
- 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}),
- 'expire_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
- 'expired': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'go_live_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
- 'has_unpublished_changes': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'live': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
- 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'owned_pages'", 'null': 'True', 'to': "orm['auth.User']"}),
- 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'search_description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'seo_title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
- 'show_in_menus': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'url_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
- },
- 'wagtailcore.pagerevision': {
- 'Meta': {'object_name': 'PageRevision'},
- 'approved_go_live_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
- 'content_json': ('django.db.models.fields.TextField', [], {}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'revisions'", 'to': "orm['wagtailcore.Page']"}),
- 'submitted_for_moderation': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'})
- },
- 'wagtailcore.pageviewrestriction': {
- 'Meta': {'object_name': 'PageViewRestriction'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'view_restrictions'", 'to': "orm['wagtailcore.Page']"}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- 'wagtailcore.site': {
- 'Meta': {'unique_together': "(('hostname', 'port'),)", 'object_name': 'Site'},
- 'hostname': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_default_site': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'port': ('django.db.models.fields.IntegerField', [], {'default': '80'}),
- 'root_page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sites_rooted_here'", 'to': "orm['wagtailcore.Page']"})
- }
- }
-
- complete_apps = ['wagtailcore']
\ No newline at end of file
diff --git a/wagtail/wagtailcore/south_migrations/0006_add_uniqueness_constraint_on_group_page_permission.py b/wagtail/wagtailcore/south_migrations/0006_add_uniqueness_constraint_on_group_page_permission.py
deleted file mode 100644
index 0e56c6e73..000000000
--- a/wagtail/wagtailcore/south_migrations/0006_add_uniqueness_constraint_on_group_page_permission.py
+++ /dev/null
@@ -1,111 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
- # Adding unique constraint on 'GroupPagePermission', fields ['group', 'page', 'permission_type']
- db.create_unique('wagtailcore_grouppagepermission', ['group_id', 'page_id', 'permission_type'])
-
-
- def backwards(self, orm):
- # Removing unique constraint on 'GroupPagePermission', fields ['group', 'page', 'permission_type']
- db.delete_unique('wagtailcore_grouppagepermission', ['group_id', 'page_id', 'permission_type'])
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Permission']"}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- },
- 'wagtailcore.grouppagepermission': {
- 'Meta': {'unique_together': "(('group', 'page', 'permission_type'),)", 'object_name': 'GroupPagePermission'},
- 'group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'page_permissions'", 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'group_permissions'", 'to': "orm['wagtailcore.Page']"}),
- 'permission_type': ('django.db.models.fields.CharField', [], {'max_length': '20'})
- },
- 'wagtailcore.page': {
- 'Meta': {'object_name': 'Page'},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['contenttypes.ContentType']"}),
- 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}),
- 'expire_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
- 'expired': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'go_live_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
- 'has_unpublished_changes': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'live': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
- 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'owned_pages'", 'null': 'True', 'to': "orm['auth.User']"}),
- 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'search_description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'seo_title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
- 'show_in_menus': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'url_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
- },
- 'wagtailcore.pagerevision': {
- 'Meta': {'object_name': 'PageRevision'},
- 'approved_go_live_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
- 'content_json': ('django.db.models.fields.TextField', [], {}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'revisions'", 'to': "orm['wagtailcore.Page']"}),
- 'submitted_for_moderation': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'})
- },
- 'wagtailcore.pageviewrestriction': {
- 'Meta': {'object_name': 'PageViewRestriction'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'view_restrictions'", 'to': "orm['wagtailcore.Page']"}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- 'wagtailcore.site': {
- 'Meta': {'unique_together': "(('hostname', 'port'),)", 'object_name': 'Site'},
- 'hostname': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_default_site': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'port': ('django.db.models.fields.IntegerField', [], {'default': '80'}),
- 'root_page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sites_rooted_here'", 'to': "orm['wagtailcore.Page']"})
- }
- }
-
- complete_apps = ['wagtailcore']
diff --git a/wagtail/wagtailcore/south_migrations/0007_auto__add_field_page_locked.py b/wagtail/wagtailcore/south_migrations/0007_auto__add_field_page_locked.py
deleted file mode 100644
index d28f2ced5..000000000
--- a/wagtail/wagtailcore/south_migrations/0007_auto__add_field_page_locked.py
+++ /dev/null
@@ -1,115 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
- # Adding field 'Page.locked'
- db.add_column('wagtailcore_page', 'locked',
- self.gf('django.db.models.fields.BooleanField')(default=False),
- keep_default=False)
-
-
- def backwards(self, orm):
- # Deleting field 'Page.locked'
- db.delete_column('wagtailcore_page', 'locked')
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Permission']"}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- },
- 'wagtailcore.grouppagepermission': {
- 'Meta': {'unique_together': "(('group', 'page', 'permission_type'),)", 'object_name': 'GroupPagePermission'},
- 'group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'page_permissions'", 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'group_permissions'", 'to': "orm['wagtailcore.Page']"}),
- 'permission_type': ('django.db.models.fields.CharField', [], {'max_length': '20'})
- },
- 'wagtailcore.page': {
- 'Meta': {'object_name': 'Page'},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['contenttypes.ContentType']"}),
- 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}),
- 'expire_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
- 'expired': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'go_live_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
- 'has_unpublished_changes': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'live': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'locked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
- 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'owned_pages'", 'null': 'True', 'to': "orm['auth.User']"}),
- 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'search_description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'seo_title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
- 'show_in_menus': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'url_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
- },
- 'wagtailcore.pagerevision': {
- 'Meta': {'object_name': 'PageRevision'},
- 'approved_go_live_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
- 'content_json': ('django.db.models.fields.TextField', [], {}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'revisions'", 'to': "orm['wagtailcore.Page']"}),
- 'submitted_for_moderation': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'})
- },
- 'wagtailcore.pageviewrestriction': {
- 'Meta': {'object_name': 'PageViewRestriction'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'view_restrictions'", 'to': "orm['wagtailcore.Page']"}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- 'wagtailcore.site': {
- 'Meta': {'unique_together': "(('hostname', 'port'),)", 'object_name': 'Site'},
- 'hostname': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_default_site': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'port': ('django.db.models.fields.IntegerField', [], {'default': '80'}),
- 'root_page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sites_rooted_here'", 'to': "orm['wagtailcore.Page']"})
- }
- }
-
- complete_apps = ['wagtailcore']
\ No newline at end of file
diff --git a/wagtail/wagtailcore/south_migrations/0008_add_page_lock_permission_to_moderators.py b/wagtail/wagtailcore/south_migrations/0008_add_page_lock_permission_to_moderators.py
deleted file mode 100644
index b1b474755..000000000
--- a/wagtail/wagtailcore/south_migrations/0008_add_page_lock_permission_to_moderators.py
+++ /dev/null
@@ -1,125 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import DataMigration
-from django.db import models, connection
-from django.db.transaction import set_autocommit
-
-
-class Migration(DataMigration):
-
- def forwards(self, orm):
- if connection.vendor == 'sqlite':
- set_autocommit(True)
-
- root_pages = orm['wagtailcore.page'].objects.filter(depth=1)
-
-
- try:
- moderators_group = orm['auth.group'].objects.get(name='Moderators')
-
- for page in root_pages:
- orm['wagtailcore.grouppagepermission'].objects.create(
- group=moderators_group, page=page, permission_type='lock')
-
- except orm['auth.group'].DoesNotExist:
- pass
-
- def backwards(self, orm):
- pass
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Permission']"}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- },
- 'wagtailcore.grouppagepermission': {
- 'Meta': {'unique_together': "(('group', 'page', 'permission_type'),)", 'object_name': 'GroupPagePermission'},
- 'group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'page_permissions'", 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'group_permissions'", 'to': "orm['wagtailcore.Page']"}),
- 'permission_type': ('django.db.models.fields.CharField', [], {'max_length': '20'})
- },
- 'wagtailcore.page': {
- 'Meta': {'object_name': 'Page'},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['contenttypes.ContentType']"}),
- 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}),
- 'expire_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
- 'expired': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'go_live_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
- 'has_unpublished_changes': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'live': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'locked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
- 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'owned_pages'", 'null': 'True', 'to': "orm['auth.User']"}),
- 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'search_description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'seo_title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
- 'show_in_menus': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'url_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
- },
- 'wagtailcore.pagerevision': {
- 'Meta': {'object_name': 'PageRevision'},
- 'approved_go_live_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
- 'content_json': ('django.db.models.fields.TextField', [], {}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'revisions'", 'to': "orm['wagtailcore.Page']"}),
- 'submitted_for_moderation': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'})
- },
- 'wagtailcore.pageviewrestriction': {
- 'Meta': {'object_name': 'PageViewRestriction'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'view_restrictions'", 'to': "orm['wagtailcore.Page']"}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- 'wagtailcore.site': {
- 'Meta': {'unique_together': "(('hostname', 'port'),)", 'object_name': 'Site'},
- 'hostname': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_default_site': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'port': ('django.db.models.fields.IntegerField', [], {'default': '80'}),
- 'root_page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sites_rooted_here'", 'to': "orm['wagtailcore.Page']"})
- }
- }
-
- complete_apps = ['wagtailcore']
- symmetrical = True
diff --git a/wagtail/wagtailcore/south_migrations/0009_auto__add_field_page_latest_revision_created_at.py b/wagtail/wagtailcore/south_migrations/0009_auto__add_field_page_latest_revision_created_at.py
deleted file mode 100644
index 244323716..000000000
--- a/wagtail/wagtailcore/south_migrations/0009_auto__add_field_page_latest_revision_created_at.py
+++ /dev/null
@@ -1,116 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
- # Adding field 'Page.latest_revision_created_at'
- db.add_column('wagtailcore_page', 'latest_revision_created_at',
- self.gf('django.db.models.fields.DateTimeField')(null=True),
- keep_default=False)
-
-
- def backwards(self, orm):
- # Deleting field 'Page.latest_revision_created_at'
- db.delete_column('wagtailcore_page', 'latest_revision_created_at')
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Permission']"}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- },
- 'wagtailcore.grouppagepermission': {
- 'Meta': {'unique_together': "(('group', 'page', 'permission_type'),)", 'object_name': 'GroupPagePermission'},
- 'group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'page_permissions'", 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'group_permissions'", 'to': "orm['wagtailcore.Page']"}),
- 'permission_type': ('django.db.models.fields.CharField', [], {'max_length': '20'})
- },
- 'wagtailcore.page': {
- 'Meta': {'object_name': 'Page'},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['contenttypes.ContentType']"}),
- 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}),
- 'expire_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
- 'expired': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'go_live_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
- 'has_unpublished_changes': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'latest_revision_created_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
- 'live': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'locked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
- 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'owned_pages'", 'null': 'True', 'to': "orm['auth.User']"}),
- 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'search_description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'seo_title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
- 'show_in_menus': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'url_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
- },
- 'wagtailcore.pagerevision': {
- 'Meta': {'object_name': 'PageRevision'},
- 'approved_go_live_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
- 'content_json': ('django.db.models.fields.TextField', [], {}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'revisions'", 'to': "orm['wagtailcore.Page']"}),
- 'submitted_for_moderation': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'})
- },
- 'wagtailcore.pageviewrestriction': {
- 'Meta': {'object_name': 'PageViewRestriction'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'view_restrictions'", 'to': "orm['wagtailcore.Page']"}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- 'wagtailcore.site': {
- 'Meta': {'unique_together': "(('hostname', 'port'),)", 'object_name': 'Site'},
- 'hostname': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_default_site': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'port': ('django.db.models.fields.IntegerField', [], {'default': '80'}),
- 'root_page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sites_rooted_here'", 'to': "orm['wagtailcore.Page']"})
- }
- }
-
- complete_apps = ['wagtailcore']
\ No newline at end of file
diff --git a/wagtail/wagtailcore/south_migrations/0010_populate_latest_revision_created_at.py b/wagtail/wagtailcore/south_migrations/0010_populate_latest_revision_created_at.py
deleted file mode 100644
index e1854dea0..000000000
--- a/wagtail/wagtailcore/south_migrations/0010_populate_latest_revision_created_at.py
+++ /dev/null
@@ -1,118 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import DataMigration
-from django.db import models
-
-
-class Migration(DataMigration):
-
- def forwards(self, orm):
- Page = orm['wagtailcore.Page']
-
- for page in Page.objects.all():
- latest_revision = page.revisions.order_by('-created_at').first()
-
- if latest_revision is not None:
- page.latest_revision_created_at = latest_revision.created_at
- page.save(update_fields=['latest_revision_created_at'])
-
- def backwards(self, orm):
- "Write your backwards methods here."
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Permission']"}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- },
- 'wagtailcore.grouppagepermission': {
- 'Meta': {'unique_together': "(('group', 'page', 'permission_type'),)", 'object_name': 'GroupPagePermission'},
- 'group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'page_permissions'", 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'group_permissions'", 'to': "orm['wagtailcore.Page']"}),
- 'permission_type': ('django.db.models.fields.CharField', [], {'max_length': '20'})
- },
- 'wagtailcore.page': {
- 'Meta': {'object_name': 'Page'},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['contenttypes.ContentType']"}),
- 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}),
- 'expire_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
- 'expired': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'go_live_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
- 'has_unpublished_changes': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'latest_revision_created_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
- 'live': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'locked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
- 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'owned_pages'", 'null': 'True', 'to': "orm['auth.User']"}),
- 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'search_description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'seo_title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
- 'show_in_menus': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'url_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
- },
- 'wagtailcore.pagerevision': {
- 'Meta': {'object_name': 'PageRevision'},
- 'approved_go_live_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
- 'content_json': ('django.db.models.fields.TextField', [], {}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'revisions'", 'to': "orm['wagtailcore.Page']"}),
- 'submitted_for_moderation': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'})
- },
- 'wagtailcore.pageviewrestriction': {
- 'Meta': {'object_name': 'PageViewRestriction'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'view_restrictions'", 'to': "orm['wagtailcore.Page']"}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- 'wagtailcore.site': {
- 'Meta': {'unique_together': "(('hostname', 'port'),)", 'object_name': 'Site'},
- 'hostname': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_default_site': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'port': ('django.db.models.fields.IntegerField', [], {'default': '80'}),
- 'root_page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sites_rooted_here'", 'to': "orm['wagtailcore.Page']"})
- }
- }
-
- complete_apps = ['wagtailcore']
- symmetrical = True
diff --git a/wagtail/wagtailcore/south_migrations/0011_remove_page_revision_created_at_auto_now__nullify_page_owner_on_delete.py b/wagtail/wagtailcore/south_migrations/0011_remove_page_revision_created_at_auto_now__nullify_page_owner_on_delete.py
deleted file mode 100644
index e7d494984..000000000
--- a/wagtail/wagtailcore/south_migrations/0011_remove_page_revision_created_at_auto_now__nullify_page_owner_on_delete.py
+++ /dev/null
@@ -1,120 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-from wagtail.wagtailcore.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME
-
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
-
- # Changing field 'PageRevision.created_at'
- db.alter_column('wagtailcore_pagerevision', 'created_at', self.gf('django.db.models.fields.DateTimeField')())
-
- # Changing field 'Page.owner'
- db.alter_column('wagtailcore_page', 'owner_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, on_delete=models.SET_NULL, to=orm[AUTH_USER_MODEL]))
-
- def backwards(self, orm):
-
- # Changing field 'PageRevision.created_at'
- db.alter_column('wagtailcore_pagerevision', 'created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True))
-
- # Changing field 'Page.owner'
- db.alter_column('wagtailcore_page', 'owner_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm[AUTH_USER_MODEL]))
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- AUTH_USER_MODEL: {
- 'Meta': {'object_name': AUTH_USER_MODEL_NAME},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Permission']"}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- },
- 'wagtailcore.grouppagepermission': {
- 'Meta': {'unique_together': "(('group', 'page', 'permission_type'),)", 'object_name': 'GroupPagePermission'},
- 'group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'page_permissions'", 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'group_permissions'", 'to': "orm['wagtailcore.Page']"}),
- 'permission_type': ('django.db.models.fields.CharField', [], {'max_length': '20'})
- },
- 'wagtailcore.page': {
- 'Meta': {'object_name': 'Page'},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['contenttypes.ContentType']"}),
- 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}),
- 'expire_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
- 'expired': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'go_live_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
- 'has_unpublished_changes': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'latest_revision_created_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
- 'live': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'locked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
- 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'owned_pages'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['%s']" % AUTH_USER_MODEL}),
- 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'search_description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'seo_title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
- 'show_in_menus': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'url_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
- },
- 'wagtailcore.pagerevision': {
- 'Meta': {'object_name': 'PageRevision'},
- 'approved_go_live_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
- 'content_json': ('django.db.models.fields.TextField', [], {}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'revisions'", 'to': "orm['wagtailcore.Page']"}),
- 'submitted_for_moderation': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['%s']" % AUTH_USER_MODEL, 'null': 'True', 'blank': 'True'})
- },
- 'wagtailcore.pageviewrestriction': {
- 'Meta': {'object_name': 'PageViewRestriction'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'view_restrictions'", 'to': "orm['wagtailcore.Page']"}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- 'wagtailcore.site': {
- 'Meta': {'unique_together': "(('hostname', 'port'),)", 'object_name': 'Site'},
- 'hostname': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_default_site': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'port': ('django.db.models.fields.IntegerField', [], {'default': '80'}),
- 'root_page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sites_rooted_here'", 'to': "orm['wagtailcore.Page']"})
- }
- }
-
- complete_apps = ['wagtailcore']
\ No newline at end of file
diff --git a/wagtail/wagtailcore/south_migrations/__init__.py b/wagtail/wagtailcore/south_migrations/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/wagtail/wagtailcore/tests/test_migrations.py b/wagtail/wagtailcore/tests/test_migrations.py
index bf8da46ff..a8d6b39f5 100644
--- a/wagtail/wagtailcore/tests/test_migrations.py
+++ b/wagtail/wagtailcore/tests/test_migrations.py
@@ -3,28 +3,17 @@ Check that all changes to Wagtail models have had migrations created. If there
are outstanding model changes that need migrations, fail the tests.
"""
-from django import VERSION
-from django.test import TransactionTestCase
-
from django.utils.six import iteritems
-import south.management.commands.schemamigration
-
-try:
- from unittest import skipIf, skipUnless
-except ImportError:
- from django.utils.unittest import skipIf, skipUnless
-
+from django.test import TransactionTestCase
+from django.apps import apps
+from django.db.migrations.loader import MigrationLoader
+from django.db.migrations.autodetector import MigrationAutodetector
+from django.db.migrations.state import ProjectState
+from django.db.migrations.questioner import MigrationQuestioner
+
class TestForMigrations(TransactionTestCase):
-
- @skipIf(VERSION < (1, 7), "Migrations introduced in Django 1.7")
- def test_django_17_migrations(self):
-
- from django.apps import apps
- from django.db.migrations.loader import MigrationLoader
- from django.db.migrations.autodetector import MigrationAutodetector
- from django.db.migrations.state import ProjectState
- from django.db.migrations.questioner import MigrationQuestioner
+ def test__migrations(self):
app_labels = set(app.label for app in apps.get_app_configs()
if app.name.startswith('wagtail.'))
for app_label in app_labels:
@@ -55,8 +44,6 @@ class TestForMigrations(TransactionTestCase):
)
if changes:
- apps = ', '.join(apps.get_app_config(label).name
- for label in changes.keys())
migrations = '\n'.join((
' {migration}\n{changes}'.format(
migration=migration,
@@ -66,64 +53,3 @@ class TestForMigrations(TransactionTestCase):
for migration in migrations))
self.fail('Model changes with no migrations detected:\n%s' % migrations)
-
- @skipUnless(VERSION < (1, 7), "South migrations used for Django < 1.7")
- def test_south_migrations(self):
-
- from django.core.exceptions import ImproperlyConfigured
- from django.conf import settings
- from django.db import models
-
- from south.migration import Migrations, migrate_app
- from south.models import MigrationHistory
- from south.exceptions import NoMigrations
- from south.creator import changes, actions, freezer
- from south.management.commands.datamigration import Command as DataCommand
-
- apps = [app for app in settings.INSTALLED_APPS
- if app.startswith('wagtail.')]
- failing_apps = []
- for app_name in apps:
- app = app_name.split('.')[-1]
- try:
- models.get_app(app)
- except ImproperlyConfigured:
- # This module fails to load, probably because it has no
- # models.py. Ignore it and move on
- continue
-
- try:
- migrations = Migrations(app, force_creation=False, verbose_creation=False)
- last_migration = migrations[-1]
- except (NoMigrations, IndexError):
- # No migrations for this app, probably doesnt have models
- continue
-
- if migrations.app_label() not in getattr(last_migration.migration_class(), "complete_apps", []):
- self.fail("Automatic migrations checking failed, since the previous migration does not have this whole app frozen.\nEither make migrations using '--freeze %s' or set 'SOUTH_AUTO_FREEZE_APP = True' in your settings.py." % migrations.app_label())
-
- # Alright, construct two model dicts to run the differ on.
- old_defs = dict(
- (k, v) for k, v in last_migration.migration_class().models.items()
- if k.split(".")[0] == migrations.app_label()
- )
- new_defs = dict(
- (k, v) for k, v in freezer.freeze_apps([migrations.app_label()]).items()
- if k.split(".")[0] == migrations.app_label()
- )
- change_source = changes.AutoChanges(
- migrations = migrations,
- old_defs = old_defs,
- old_orm = last_migration.orm(),
- new_defs = new_defs,
- )
-
- name = 'test'
-
- # Get the actions, and then insert them into the actions lists
- if list(change_source.get_changes()):
- failing_apps.append(app_name)
-
- if failing_apps:
- self.fail('Model changes with no South migration detected in apps: %s' % (
- ', '.join(failing_apps)))
diff --git a/wagtail/wagtaildocs/south_migrations/0001_initial.py b/wagtail/wagtaildocs/south_migrations/0001_initial.py
deleted file mode 100644
index 6c501ef7f..000000000
--- a/wagtail/wagtaildocs/south_migrations/0001_initial.py
+++ /dev/null
@@ -1,82 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-from wagtail.wagtailcore.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME
-
-
-class Migration(SchemaMigration):
-
- depends_on = (
- ("wagtailcore", "0002_initial_data"),
- )
-
- def forwards(self, orm):
- # Adding model 'Document'
- db.create_table('wagtaildocs_document', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('title', self.gf('django.db.models.fields.CharField')(max_length=255)),
- ('file', self.gf('django.db.models.fields.files.FileField')(max_length=100)),
- ('created_at', self.gf('django.db.models.fields.DateTimeField')
- (auto_now_add=True, blank=True)),
- ('uploaded_by_user', self.gf('django.db.models.fields.related.ForeignKey')
- (to=orm[AUTH_USER_MODEL], null=True, blank=True)),
- ))
- db.send_create_signal('wagtaildocs', ['Document'])
-
- def backwards(self, orm):
- # Deleting model 'Document'
- db.delete_table('wagtaildocs_document')
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- AUTH_USER_MODEL: {
- 'Meta': {'object_name': AUTH_USER_MODEL_NAME},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Permission']"}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- },
- 'wagtaildocs.document': {
- 'Meta': {'object_name': 'Document'},
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'uploaded_by_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['%s']" % AUTH_USER_MODEL, 'null': 'True', 'blank': 'True'})
- }
- }
-
- complete_apps = ['wagtaildocs']
diff --git a/wagtail/wagtaildocs/south_migrations/0002_initial_data.py b/wagtail/wagtaildocs/south_migrations/0002_initial_data.py
deleted file mode 100644
index 6b58875c3..000000000
--- a/wagtail/wagtaildocs/south_migrations/0002_initial_data.py
+++ /dev/null
@@ -1,92 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import DataMigration
-from django.db import models, connection
-from django.db.transaction import set_autocommit
-
-from wagtail.wagtailcore.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME
-
-
-class Migration(DataMigration):
-
- def forwards(self, orm):
- if connection.vendor == 'sqlite':
- set_autocommit(True)
- document_content_type, created = orm['contenttypes.ContentType'].objects.get_or_create(
- model='document', app_label='wagtaildocs', defaults={'name': 'document'})
- add_permission, created = orm['auth.permission'].objects.get_or_create(
- content_type=document_content_type, codename='add_document', defaults=dict(name='Can add document'))
- change_permission, created = orm['auth.permission'].objects.get_or_create(
- content_type=document_content_type, codename='change_document', defaults=dict(name='Can change document'))
- delete_permission, created = orm['auth.permission'].objects.get_or_create(
- content_type=document_content_type, codename='delete_document', defaults=dict(name='Can delete document'))
-
- editors_group = orm['auth.group'].objects.get(name='Editors')
- editors_group.permissions.add(add_permission, change_permission, delete_permission)
-
- moderators_group = orm['auth.group'].objects.get(name='Moderators')
- moderators_group.permissions.add(add_permission, change_permission, delete_permission)
-
- def backwards(self, orm):
- document_content_type = orm['contenttypes.ContentType'].objects.get(
- model='document', app_label='wagtaildocs')
- document_permissions = orm['auth.permission'].objects.filter(content_type=document_content_type)
-
- editors_group = orm['auth.group'].objects.get(name='Editors')
- editors_group.permissions.remove(*document_permissions)
-
- moderators_group = orm['auth.group'].objects.get(name='Moderators')
- moderators_group.permissions.remove(*document_permissions)
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- AUTH_USER_MODEL: {
- 'Meta': {'object_name': AUTH_USER_MODEL_NAME},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Permission']"}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- },
- 'wagtaildocs.document': {
- 'Meta': {'object_name': 'Document'},
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'uploaded_by_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['%s']" % AUTH_USER_MODEL, 'null': 'True', 'blank': 'True'})
- }
- }
-
- complete_apps = ['wagtaildocs']
- symmetrical = True
diff --git a/wagtail/wagtaildocs/south_migrations/__init__.py b/wagtail/wagtaildocs/south_migrations/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/wagtail/wagtaildocs/tests.py b/wagtail/wagtaildocs/tests.py
index 4c19c0bfd..117d3bfed 100644
--- a/wagtail/wagtaildocs/tests.py
+++ b/wagtail/wagtaildocs/tests.py
@@ -1,4 +1,5 @@
from six import b
+import unittest
from django.test import TestCase
from django.contrib.auth import get_user_model
@@ -7,7 +8,7 @@ from django.core.urlresolvers import reverse
from django.core.files.base import ContentFile
from django.test.utils import override_settings
-from wagtail.tests.utils import unittest, WagtailTestUtils
+from wagtail.tests.utils import WagtailTestUtils
from wagtail.wagtailcore.models import Page
from wagtail.tests.models import EventPage, EventPageRelatedLink
diff --git a/wagtail/wagtailembeds/embeds.py b/wagtail/wagtailembeds/embeds.py
index b78027e67..c41611d70 100644
--- a/wagtail/wagtailembeds/embeds.py
+++ b/wagtail/wagtailembeds/embeds.py
@@ -1,14 +1,6 @@
-import sys
from datetime import datetime
import json
-try:
- from importlib import import_module
-except ImportError:
- # for Python 2.6, fall back on django.utils.importlib (deprecated as of Django 1.7)
- from django.utils.importlib import import_module
-
-
# Needs to be imported like this to allow @patch to work in tests
from six.moves.urllib import request as urllib_request
@@ -16,6 +8,7 @@ from six.moves.urllib.request import Request
from six.moves.urllib.error import URLError
from six.moves.urllib.parse import urlencode
+from django.utils.module_loading import import_string
from django.conf import settings
from django.utils import six
@@ -23,35 +16,11 @@ from wagtail.wagtailembeds.oembed_providers import get_oembed_provider
from wagtail.wagtailembeds.models import Embed
-
class EmbedNotFoundException(Exception): pass
class EmbedlyException(Exception): pass
class AccessDeniedEmbedlyException(EmbedlyException): pass
-# Pinched from django 1.7 source code.
-# TODO: Replace this with "from django.utils.module_loading import import_string" when django 1.7 is released
-def import_string(dotted_path):
- """
- Import a dotted module path and return the attribute/class designated by the
- last name in the path. Raise ImportError if the import failed.
- """
- try:
- module_path, class_name = dotted_path.rsplit('.', 1)
- except ValueError:
- msg = "%s doesn't look like a module path" % dotted_path
- six.reraise(ImportError, ImportError(msg), sys.exc_info()[2])
-
- module = import_module(module_path)
-
- try:
- return getattr(module, class_name)
- except AttributeError:
- msg = 'Module "%s" does not define a "%s" attribute/class' % (
- dotted_path, class_name)
- six.reraise(ImportError, ImportError(msg), sys.exc_info()[2])
-
-
def embedly(url, max_width=None, key=None):
from embedly import Embedly
diff --git a/wagtail/wagtailembeds/south_migrations/0001_initial.py b/wagtail/wagtailembeds/south_migrations/0001_initial.py
deleted file mode 100644
index ba5d5bbe0..000000000
--- a/wagtail/wagtailembeds/south_migrations/0001_initial.py
+++ /dev/null
@@ -1,63 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
- depends_on = (
- ("wagtailcore", "0002_initial_data"),
- )
-
- def forwards(self, orm):
- # Adding model 'Embed'
- db.create_table('wagtailembeds_embed', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('url', self.gf('django.db.models.fields.URLField')(max_length=200)),
- ('max_width', self.gf('django.db.models.fields.SmallIntegerField')
- (null=True, blank=True)),
- ('type', self.gf('django.db.models.fields.CharField')(max_length=10)),
- ('html', self.gf('django.db.models.fields.TextField')(blank=True)),
- ('title', self.gf('django.db.models.fields.TextField')(blank=True)),
- ('thumbnail_url', self.gf('django.db.models.fields.URLField')
- (max_length=200, null=True, blank=True)),
- ('width', self.gf('django.db.models.fields.IntegerField')
- (null=True, blank=True)),
- ('height', self.gf('django.db.models.fields.IntegerField')
- (null=True, blank=True)),
- ('last_updated', self.gf('django.db.models.fields.DateTimeField')
- (auto_now=True, blank=True)),
- ))
- db.send_create_signal('wagtailembeds', ['Embed'])
-
- # Adding unique constraint on 'Embed', fields ['url', 'max_width']
- db.create_unique('wagtailembeds_embed', ['url', 'max_width'])
-
- def backwards(self, orm):
- # Removing unique constraint on 'Embed', fields ['url', 'max_width']
- db.delete_unique('wagtailembeds_embed', ['url', 'max_width'])
-
- # Deleting model 'Embed'
- db.delete_table('wagtailembeds_embed')
-
- models = {
- 'wagtailembeds.embed': {
- 'Meta': {'unique_together': "(('url', 'max_width'),)", 'object_name': 'Embed'},
- 'height': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'last_updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
- 'max_width': ('django.db.models.fields.SmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'thumbnail_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
- 'title': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
- 'url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
- 'width': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
- }
- }
-
- complete_apps = ['wagtailembeds']
diff --git a/wagtail/wagtailembeds/south_migrations/0002_auto__add_field_embed_author_name__add_field_embed_provider_name.py b/wagtail/wagtailembeds/south_migrations/0002_auto__add_field_embed_author_name__add_field_embed_provider_name.py
deleted file mode 100644
index dd05de09d..000000000
--- a/wagtail/wagtailembeds/south_migrations/0002_auto__add_field_embed_author_name__add_field_embed_provider_name.py
+++ /dev/null
@@ -1,50 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
- # Adding field 'Embed.author_name'
- db.add_column('wagtailembeds_embed', 'author_name',
- self.gf('django.db.models.fields.TextField')(default='', blank=True),
- keep_default=False)
-
- # Adding field 'Embed.provider_name'
- db.add_column('wagtailembeds_embed', 'provider_name',
- self.gf('django.db.models.fields.TextField')(default='', blank=True),
- keep_default=False)
-
-
- def backwards(self, orm):
- # Deleting field 'Embed.author_name'
- db.delete_column('wagtailembeds_embed', 'author_name')
-
- # Deleting field 'Embed.provider_name'
- db.delete_column('wagtailembeds_embed', 'provider_name')
-
-
- models = {
- 'wagtailembeds.embed': {
- 'Meta': {'unique_together': "(('url', 'max_width'),)", 'object_name': 'Embed'},
- 'author_name': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'height': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'last_updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
- 'max_width': ('django.db.models.fields.SmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'provider_name': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'thumbnail_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
- 'title': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
- 'url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
- 'width': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
- }
- }
-
- complete_apps = ['wagtailembeds']
\ No newline at end of file
diff --git a/wagtail/wagtailembeds/south_migrations/__init__.py b/wagtail/wagtailembeds/south_migrations/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/wagtail/wagtailembeds/tests.py b/wagtail/wagtailembeds/tests.py
index 6b1e0a0ec..4ec2e7637 100644
--- a/wagtail/wagtailembeds/tests.py
+++ b/wagtail/wagtailembeds/tests.py
@@ -3,6 +3,7 @@ from six.moves.urllib.error import URLError
from mock import patch
import warnings
+import unittest
try:
import embedly
@@ -13,7 +14,7 @@ except ImportError:
from django import template
from django.test import TestCase
-from wagtail.tests.utils import WagtailTestUtils, unittest
+from wagtail.tests.utils import WagtailTestUtils
from wagtail.wagtailembeds.embeds import (
EmbedNotFoundException,
diff --git a/wagtail/wagtailforms/south_migrations/0001_initial.py b/wagtail/wagtailforms/south_migrations/0001_initial.py
deleted file mode 100644
index 5543ff289..000000000
--- a/wagtail/wagtailforms/south_migrations/0001_initial.py
+++ /dev/null
@@ -1,97 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-from wagtail.wagtailcore.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME
-
-
-class Migration(SchemaMigration):
-
- depends_on = (
- ("wagtailcore", "0002_initial_data"),
- )
-
- def forwards(self, orm):
- # Adding model 'FormSubmission'
- db.create_table('wagtailforms_formsubmission', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('form_data', self.gf('django.db.models.fields.TextField')()),
- ('page', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['wagtailcore.Page'])),
- ('submit_time', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
- ))
- db.send_create_signal('wagtailforms', ['FormSubmission'])
-
-
- def backwards(self, orm):
- # Deleting model 'FormSubmission'
- db.delete_table('wagtailforms_formsubmission')
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- AUTH_USER_MODEL: {
- 'Meta': {'object_name': AUTH_USER_MODEL_NAME},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Permission']"}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- },
- 'wagtailcore.page': {
- 'Meta': {'object_name': 'Page'},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['contenttypes.ContentType']"}),
- 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}),
- 'has_unpublished_changes': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'live': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
- 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'owned_pages'", 'null': 'True', 'to': "orm['%s']" % AUTH_USER_MODEL}),
- 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'search_description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'seo_title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
- 'show_in_menus': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'url_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
- },
- 'wagtailforms.formsubmission': {
- 'Meta': {'object_name': 'FormSubmission'},
- 'form_data': ('django.db.models.fields.TextField', [], {}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['wagtailcore.Page']"}),
- 'submit_time': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
- }
- }
-
- complete_apps = ['wagtailforms']
\ No newline at end of file
diff --git a/wagtail/wagtailforms/south_migrations/__init__.py b/wagtail/wagtailforms/south_migrations/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/wagtail/wagtailimages/backends/__init__.py b/wagtail/wagtailimages/backends/__init__.py
index e60b89688..c13504006 100644
--- a/wagtail/wagtailimages/backends/__init__.py
+++ b/wagtail/wagtailimages/backends/__init__.py
@@ -2,46 +2,15 @@
# Based on the Django cache framework and wagtailsearch
# https://github.com/django/django/blob/5d263dee304fdaf95e18d2f0619d6925984a7f02/django/core/cache/__init__.py
-try:
- from importlib import import_module
-except ImportError:
- # for Python 2.6, fall back on django.utils.importlib (deprecated as of Django 1.7)
- from django.utils.importlib import import_module
-import sys
-
-from django.utils import six
-from django.conf import settings
+from django.utils.module_loading import import_string
from django.core.exceptions import ImproperlyConfigured
+from django.conf import settings
class InvalidImageBackendError(ImproperlyConfigured):
pass
-# Pinched from django 1.7 source code.
-# TODO: Replace this with "from django.utils.module_loading import import_string"
-# when django 1.7 is released
-# TODO: This is not DRY - should be imported from a utils module
-def import_string(dotted_path):
- """
- Import a dotted module path and return the attribute/class designated by the
- last name in the path. Raise ImportError if the import failed.
- """
- try:
- module_path, class_name = dotted_path.rsplit('.', 1)
- except ValueError:
- msg = "%s doesn't look like a module path" % dotted_path
- six.reraise(ImportError, ImportError(msg), sys.exc_info()[2])
-
- module = import_module(module_path)
-
- try:
- return getattr(module, class_name)
- except AttributeError:
- msg = 'Module "%s" does not define a "%s" attribute/class' % (
- dotted_path, class_name)
- six.reraise(ImportError, ImportError(msg), sys.exc_info()[2])
-
def get_image_backend(backend='default', **kwargs):
# Get configuration
diff --git a/wagtail/wagtailimages/south_migrations/0001_initial.py b/wagtail/wagtailimages/south_migrations/0001_initial.py
deleted file mode 100644
index d92d2ea6c..000000000
--- a/wagtail/wagtailimages/south_migrations/0001_initial.py
+++ /dev/null
@@ -1,133 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-from wagtail.wagtailcore.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME
-
-
-class Migration(SchemaMigration):
-
- depends_on = (
- ("wagtailcore", "0002_initial_data"),
- )
-
- def forwards(self, orm):
- # Adding model 'Image'
- db.create_table('wagtailimages_image', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('title', self.gf('django.db.models.fields.CharField')(max_length=255)),
- ('file', self.gf('django.db.models.fields.files.ImageField')(max_length=100)),
- ('width', self.gf('django.db.models.fields.IntegerField')()),
- ('height', self.gf('django.db.models.fields.IntegerField')()),
- ('created_at', self.gf('django.db.models.fields.DateTimeField')
- (auto_now_add=True, blank=True)),
- ('uploaded_by_user', self.gf('django.db.models.fields.related.ForeignKey')
- (to=orm[AUTH_USER_MODEL], null=True, blank=True)),
- ))
- db.send_create_signal('wagtailimages', ['Image'])
-
- # Adding model 'Filter'
- db.create_table('wagtailimages_filter', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('spec', self.gf('django.db.models.fields.CharField')
- (max_length=255, db_index=True)),
- ))
- db.send_create_signal('wagtailimages', ['Filter'])
-
- # Adding model 'Rendition'
- db.create_table('wagtailimages_rendition', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('filter', self.gf('django.db.models.fields.related.ForeignKey')
- (related_name='+', to=orm['wagtailimages.Filter'])),
- ('file', self.gf('django.db.models.fields.files.ImageField')(max_length=100)),
- ('width', self.gf('django.db.models.fields.IntegerField')()),
- ('height', self.gf('django.db.models.fields.IntegerField')()),
- ('image', self.gf('django.db.models.fields.related.ForeignKey')
- (related_name='renditions', to=orm['wagtailimages.Image'])),
- ))
- db.send_create_signal('wagtailimages', ['Rendition'])
-
- # Adding unique constraint on 'Rendition', fields ['image', 'filter']
- db.create_unique('wagtailimages_rendition', ['image_id', 'filter_id'])
-
- def backwards(self, orm):
- # Removing unique constraint on 'Rendition', fields ['image', 'filter']
- db.delete_unique('wagtailimages_rendition', ['image_id', 'filter_id'])
-
- # Deleting model 'Image'
- db.delete_table('wagtailimages_image')
-
- # Deleting model 'Filter'
- db.delete_table('wagtailimages_filter')
-
- # Deleting model 'Rendition'
- db.delete_table('wagtailimages_rendition')
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- AUTH_USER_MODEL: {
- 'Meta': {'object_name': AUTH_USER_MODEL_NAME},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Permission']"}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- },
- 'wagtailimages.filter': {
- 'Meta': {'object_name': 'Filter'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'spec': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'})
- },
- 'wagtailimages.image': {
- 'Meta': {'object_name': 'Image'},
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'file': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
- 'height': ('django.db.models.fields.IntegerField', [], {}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'uploaded_by_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['%s']" % AUTH_USER_MODEL, 'null': 'True', 'blank': 'True'}),
- 'width': ('django.db.models.fields.IntegerField', [], {})
- },
- 'wagtailimages.rendition': {
- 'Meta': {'unique_together': "(('image', 'filter'),)", 'object_name': 'Rendition'},
- 'file': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
- 'filter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['wagtailimages.Filter']"}),
- 'height': ('django.db.models.fields.IntegerField', [], {}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'image': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'renditions'", 'to': "orm['wagtailimages.Image']"}),
- 'width': ('django.db.models.fields.IntegerField', [], {})
- }
- }
-
- complete_apps = ['wagtailimages']
diff --git a/wagtail/wagtailimages/south_migrations/0002_initial_data.py b/wagtail/wagtailimages/south_migrations/0002_initial_data.py
deleted file mode 100644
index 32081cd59..000000000
--- a/wagtail/wagtailimages/south_migrations/0002_initial_data.py
+++ /dev/null
@@ -1,108 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import DataMigration
-from django.db import models, connection
-from django.db.transaction import set_autocommit
-
-from wagtail.wagtailcore.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME
-
-
-class Migration(DataMigration):
-
- def forwards(self, orm):
- if connection.vendor == 'sqlite':
- set_autocommit(True)
- image_content_type, created = orm['contenttypes.ContentType'].objects.get_or_create(
- model='image', app_label='wagtailimages', defaults={'name': 'image'})
- add_permission, created = orm['auth.permission'].objects.get_or_create(
- content_type=image_content_type, codename='add_image', defaults=dict(name='Can add image'))
- change_permission, created = orm['auth.permission'].objects.get_or_create(
- content_type=image_content_type, codename='change_image', defaults=dict(name='Can change image'))
- delete_permission, created = orm['auth.permission'].objects.get_or_create(
- content_type=image_content_type, codename='delete_image', defaults=dict(name='Can delete image'))
-
- editors_group = orm['auth.group'].objects.get(name='Editors')
- editors_group.permissions.add(add_permission, change_permission, delete_permission)
-
- moderators_group = orm['auth.group'].objects.get(name='Moderators')
- moderators_group.permissions.add(add_permission, change_permission, delete_permission)
-
- def backwards(self, orm):
- image_content_type = orm['contenttypes.ContentType'].objects.get(
- model='image', app_label='wagtailimages')
- image_permissions = orm['auth.permission'].objects.filter(content_type=image_content_type)
-
- editors_group = orm['auth.group'].objects.get(name='Editors')
- editors_group.permissions.remove(*image_permissions)
-
- moderators_group = orm['auth.group'].objects.get(name='Moderators')
- moderators_group.permissions.remove(*image_permissions)
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- AUTH_USER_MODEL: {
- 'Meta': {'object_name': AUTH_USER_MODEL_NAME},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Permission']"}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- },
- 'wagtailimages.filter': {
- 'Meta': {'object_name': 'Filter'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'spec': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'})
- },
- 'wagtailimages.image': {
- 'Meta': {'object_name': 'Image'},
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'file': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
- 'height': ('django.db.models.fields.IntegerField', [], {}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'uploaded_by_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['%s']" % AUTH_USER_MODEL, 'null': 'True', 'blank': 'True'}),
- 'width': ('django.db.models.fields.IntegerField', [], {})
- },
- 'wagtailimages.rendition': {
- 'Meta': {'unique_together': "(('image', 'filter'),)", 'object_name': 'Rendition'},
- 'file': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
- 'filter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['wagtailimages.Filter']"}),
- 'height': ('django.db.models.fields.IntegerField', [], {}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'image': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'renditions'", 'to': "orm['wagtailimages.Image']"}),
- 'width': ('django.db.models.fields.IntegerField', [], {})
- }
- }
-
- complete_apps = ['wagtailimages']
- symmetrical = True
diff --git a/wagtail/wagtailimages/south_migrations/0003_focal_point_fields.py b/wagtail/wagtailimages/south_migrations/0003_focal_point_fields.py
deleted file mode 100644
index 185d37106..000000000
--- a/wagtail/wagtailimages/south_migrations/0003_focal_point_fields.py
+++ /dev/null
@@ -1,138 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-from wagtail.wagtailcore.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME
-
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
- # Removing unique constraint on 'Rendition', fields ['image', 'filter']
- db.delete_unique('wagtailimages_rendition', ['image_id', 'filter_id'])
-
- # Adding field 'Image.focal_point_x'
- db.add_column('wagtailimages_image', 'focal_point_x',
- self.gf('django.db.models.fields.PositiveIntegerField')(null=True),
- keep_default=False)
-
- # Adding field 'Image.focal_point_y'
- db.add_column('wagtailimages_image', 'focal_point_y',
- self.gf('django.db.models.fields.PositiveIntegerField')(null=True),
- keep_default=False)
-
- # Adding field 'Image.focal_point_width'
- db.add_column('wagtailimages_image', 'focal_point_width',
- self.gf('django.db.models.fields.PositiveIntegerField')(null=True),
- keep_default=False)
-
- # Adding field 'Image.focal_point_height'
- db.add_column('wagtailimages_image', 'focal_point_height',
- self.gf('django.db.models.fields.PositiveIntegerField')(null=True),
- keep_default=False)
-
- # Adding field 'Rendition.focal_point_key'
- db.add_column('wagtailimages_rendition', 'focal_point_key',
- self.gf('django.db.models.fields.CharField')(max_length=255, null=True),
- keep_default=False)
-
- # Adding unique constraint on 'Rendition', fields ['image', 'filter', 'focal_point_key']
- db.create_unique('wagtailimages_rendition', ['image_id', 'filter_id', 'focal_point_key'])
-
-
- def backwards(self, orm):
- # Removing unique constraint on 'Rendition', fields ['image', 'filter', 'focal_point_key']
- db.delete_unique('wagtailimages_rendition', ['image_id', 'filter_id', 'focal_point_key'])
-
- # Deleting field 'Image.focal_point_x'
- db.delete_column('wagtailimages_image', 'focal_point_x')
-
- # Deleting field 'Image.focal_point_y'
- db.delete_column('wagtailimages_image', 'focal_point_y')
-
- # Deleting field 'Image.focal_point_width'
- db.delete_column('wagtailimages_image', 'focal_point_width')
-
- # Deleting field 'Image.focal_point_height'
- db.delete_column('wagtailimages_image', 'focal_point_height')
-
- # Deleting field 'Rendition.focal_point_key'
- db.delete_column('wagtailimages_rendition', 'focal_point_key')
-
- # Adding unique constraint on 'Rendition', fields ['image', 'filter']
- db.create_unique('wagtailimages_rendition', ['image_id', 'filter_id'])
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- AUTH_USER_MODEL: {
- 'Meta': {'object_name': AUTH_USER_MODEL_NAME},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Permission']"}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- },
- 'wagtailimages.filter': {
- 'Meta': {'object_name': 'Filter'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'spec': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'})
- },
- 'wagtailimages.image': {
- 'Meta': {'object_name': 'Image'},
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'file': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
- 'focal_point_height': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}),
- 'focal_point_width': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}),
- 'focal_point_x': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}),
- 'focal_point_y': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}),
- 'height': ('django.db.models.fields.IntegerField', [], {}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'uploaded_by_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['%s']" % AUTH_USER_MODEL, 'null': 'True', 'blank': 'True'}),
- 'width': ('django.db.models.fields.IntegerField', [], {})
- },
- 'wagtailimages.rendition': {
- 'Meta': {'unique_together': "(('image', 'filter', 'focal_point_key'),)", 'object_name': 'Rendition'},
- 'file': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
- 'filter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['wagtailimages.Filter']"}),
- 'focal_point_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
- 'height': ('django.db.models.fields.IntegerField', [], {}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'image': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'renditions'", 'to': "orm['wagtailimages.Image']"}),
- 'width': ('django.db.models.fields.IntegerField', [], {})
- }
- }
-
- complete_apps = ['wagtailimages']
diff --git a/wagtail/wagtailimages/south_migrations/0004_auto__chg_field_rendition_focal_point_key.py b/wagtail/wagtailimages/south_migrations/0004_auto__chg_field_rendition_focal_point_key.py
deleted file mode 100644
index 25202438e..000000000
--- a/wagtail/wagtailimages/south_migrations/0004_auto__chg_field_rendition_focal_point_key.py
+++ /dev/null
@@ -1,109 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-from wagtail.wagtailcore.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME
-
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
- # remove duplicate renditions
- if db._get_connection().vendor == 'mysql':
- db.execute("""
- DELETE FROM wagtailimages_rendition WHERE CONCAT(image_id, '-', filter_id) IN (
- SELECT CONCAT(image_id, '-', filter_id) FROM (SELECT * FROM wagtailimages_rendition) as x
- WHERE focal_point_key IS NULL
- GROUP BY image_id, filter_id HAVING COUNT(*) > 1
- ) AND focal_point_key IS NULL
- """)
- else:
- db.execute("""
- DELETE FROM wagtailimages_rendition WHERE image_id || '-' || filter_id IN (
- SELECT image_id || '-' || filter_id FROM wagtailimages_rendition
- WHERE focal_point_key IS NULL
- GROUP BY image_id, filter_id HAVING COUNT(*) > 1
- ) AND focal_point_key IS NULL
- """)
-
- # Changing field 'Rendition.focal_point_key'
- db.alter_column('wagtailimages_rendition', 'focal_point_key', self.gf('django.db.models.fields.CharField')(max_length=255, default=''))
-
- def backwards(self, orm):
-
- # Changing field 'Rendition.focal_point_key'
- db.alter_column('wagtailimages_rendition', 'focal_point_key', self.gf('django.db.models.fields.CharField')(max_length=255, null=True))
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- AUTH_USER_MODEL: {
- 'Meta': {'object_name': AUTH_USER_MODEL_NAME},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Permission']"}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- },
- 'wagtailimages.filter': {
- 'Meta': {'object_name': 'Filter'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'spec': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'})
- },
- 'wagtailimages.image': {
- 'Meta': {'object_name': 'Image'},
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'file': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
- 'focal_point_height': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'focal_point_width': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'focal_point_x': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'focal_point_y': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'height': ('django.db.models.fields.IntegerField', [], {}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'uploaded_by_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['%s']" % AUTH_USER_MODEL, 'null': 'True', 'blank': 'True'}),
- 'width': ('django.db.models.fields.IntegerField', [], {})
- },
- 'wagtailimages.rendition': {
- 'Meta': {'unique_together': "(('image', 'filter', 'focal_point_key'),)", 'object_name': 'Rendition'},
- 'file': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
- 'filter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['wagtailimages.Filter']"}),
- 'focal_point_key': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}),
- 'height': ('django.db.models.fields.IntegerField', [], {}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'image': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'renditions'", 'to': "orm['wagtailimages.Image']"}),
- 'width': ('django.db.models.fields.IntegerField', [], {})
- }
- }
-
- complete_apps = ['wagtailimages']
diff --git a/wagtail/wagtailimages/south_migrations/0005_make_filter_spec_unique.py b/wagtail/wagtailimages/south_migrations/0005_make_filter_spec_unique.py
deleted file mode 100644
index 1593e3f30..000000000
--- a/wagtail/wagtailimages/south_migrations/0005_make_filter_spec_unique.py
+++ /dev/null
@@ -1,90 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-from wagtail.wagtailcore.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME
-
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
- # Adding unique constraint on 'Filter', fields ['spec']
- db.create_unique('wagtailimages_filter', ['spec'])
-
-
- def backwards(self, orm):
- # Removing unique constraint on 'Filter', fields ['spec']
- db.delete_unique('wagtailimages_filter', ['spec'])
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- AUTH_USER_MODEL: {
- 'Meta': {'object_name': AUTH_USER_MODEL_NAME},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Permission']"}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- },
- 'wagtailimages.filter': {
- 'Meta': {'object_name': 'Filter'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'spec': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'})
- },
- 'wagtailimages.image': {
- 'Meta': {'object_name': 'Image'},
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'file': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
- 'focal_point_height': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'focal_point_width': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'focal_point_x': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'focal_point_y': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'height': ('django.db.models.fields.IntegerField', [], {}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'uploaded_by_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['%s']" % AUTH_USER_MODEL, 'null': 'True', 'blank': 'True'}),
- 'width': ('django.db.models.fields.IntegerField', [], {})
- },
- 'wagtailimages.rendition': {
- 'Meta': {'unique_together': "(('image', 'filter', 'focal_point_key'),)", 'object_name': 'Rendition'},
- 'file': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
- 'filter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['wagtailimages.Filter']"}),
- 'focal_point_key': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}),
- 'height': ('django.db.models.fields.IntegerField', [], {}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'image': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'renditions'", 'to': "orm['wagtailimages.Image']"}),
- 'width': ('django.db.models.fields.IntegerField', [], {})
- }
- }
-
- complete_apps = ['wagtailimages']
\ No newline at end of file
diff --git a/wagtail/wagtailimages/south_migrations/__init__.py b/wagtail/wagtailimages/south_migrations/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/wagtail/wagtailimages/tests/test_models.py b/wagtail/wagtailimages/tests/test_models.py
index b867117c6..d09339699 100644
--- a/wagtail/wagtailimages/tests/test_models.py
+++ b/wagtail/wagtailimages/tests/test_models.py
@@ -1,3 +1,5 @@
+import unittest
+
from django.test import TestCase
from django.core.urlresolvers import reverse
from django.test.utils import override_settings
@@ -8,7 +10,7 @@ from django.core.files.uploadedfile import SimpleUploadedFile
from django.db.utils import IntegrityError
from django.db import connection
-from wagtail.tests.utils import WagtailTestUtils, unittest, test_concurrently
+from wagtail.tests.utils import WagtailTestUtils, test_concurrently
from wagtail.wagtailcore.models import Page
from wagtail.tests.models import EventPage, EventPageCarouselItem
from wagtail.wagtailimages.models import Rendition, Filter
diff --git a/wagtail/wagtailredirects/south_migrations/0001_initial.py b/wagtail/wagtailredirects/south_migrations/0001_initial.py
deleted file mode 100644
index bf8b5300a..000000000
--- a/wagtail/wagtailredirects/south_migrations/0001_initial.py
+++ /dev/null
@@ -1,91 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-import datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
- depends_on = (
- ("wagtailcore", "0002_initial_data"),
- )
-
- def forwards(self, orm):
- # Adding model 'Redirect'
- db.create_table('wagtailredirects_redirect', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('old_path', self.gf('django.db.models.fields.CharField')
- (unique=True, max_length=255, db_index=True)),
- ('site', self.gf('django.db.models.fields.related.ForeignKey')
- (blank=True, related_name='redirects', null=True, to=orm['wagtailcore.Site'])),
- ('is_permanent', self.gf('django.db.models.fields.BooleanField')(default=True)),
- ('redirect_page', self.gf('django.db.models.fields.related.ForeignKey')
- (blank=True, related_name='+', null=True, to=orm['wagtailcore.Page'])),
- ('redirect_link', self.gf('django.db.models.fields.URLField')
- (max_length=200, blank=True)),
- ))
- db.send_create_signal('wagtailredirects', ['Redirect'])
-
- def backwards(self, orm):
- # Deleting model 'Redirect'
- db.delete_table('wagtailredirects_redirect')
-
- models = {
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- },
- 'wagtailcore.page': {
- 'Meta': {'object_name': 'Page'},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['contenttypes.ContentType']"}),
- 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}),
- 'has_unpublished_changes': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'live': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
- 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'seo_title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
- 'show_in_menus': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'url_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
- },
- 'wagtailcore.site': {
- 'Meta': {'object_name': 'Site'},
- 'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_default_site': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'port': ('django.db.models.fields.IntegerField', [], {'default': '80'}),
- 'root_page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sites_rooted_here'", 'to': "orm['wagtailcore.Page']"})
- },
- 'taggit.tag': {
- 'Meta': {'object_name': 'Tag'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'})
- },
- 'taggit.taggeditem': {
- 'Meta': {'object_name': 'TaggedItem'},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
- 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"})
- },
- 'wagtailredirects.redirect': {
- 'Meta': {'object_name': 'Redirect'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_permanent': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'old_path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}),
- 'redirect_link': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
- 'redirect_page': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['wagtailcore.Page']"}),
- 'site': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'redirects'", 'null': 'True', 'to': "orm['wagtailcore.Site']"})
- }
- }
-
- complete_apps = ['wagtailredirects']
diff --git a/wagtail/wagtailredirects/south_migrations/__init__.py b/wagtail/wagtailredirects/south_migrations/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/wagtail/wagtailsearch/backends/__init__.py b/wagtail/wagtailsearch/backends/__init__.py
index a06f7a4f8..fa6fcf017 100644
--- a/wagtail/wagtailsearch/backends/__init__.py
+++ b/wagtail/wagtailsearch/backends/__init__.py
@@ -2,47 +2,16 @@
# Based on the Django cache framework
# https://github.com/django/django/blob/5d263dee304fdaf95e18d2f0619d6925984a7f02/django/core/cache/__init__.py
-try:
- from importlib import import_module
-except ImportError:
- # for Python 2.6, fall back on django.utils.importlib (deprecated as of Django 1.7)
- from django.utils.importlib import import_module
-import sys
-
-from django.utils import six
-from django.conf import settings
+from django.utils.module_loading import import_string
from django.core.exceptions import ImproperlyConfigured
+from django.conf import settings
class InvalidSearchBackendError(ImproperlyConfigured):
pass
-# Pinched from django 1.7 source code.
-# TODO: Replace this with "from django.utils.module_loading import import_string"
-# when django 1.7 is released
-def import_string(dotted_path):
- """
- Import a dotted module path and return the attribute/class designated by the
- last name in the path. Raise ImportError if the import failed.
- """
- try:
- module_path, class_name = dotted_path.rsplit('.', 1)
- except ValueError:
- msg = "%s doesn't look like a module path" % dotted_path
- six.reraise(ImportError, ImportError(msg), sys.exc_info()[2])
-
- module = import_module(module_path)
-
- try:
- return getattr(module, class_name)
- except AttributeError:
- msg = 'Module "%s" does not define a "%s" attribute/class' % (
- dotted_path, class_name)
- six.reraise(ImportError, ImportError(msg), sys.exc_info()[2])
-
-
def get_search_backend(backend='default', **kwargs):
# Get configuration
default_conf = {
diff --git a/wagtail/wagtailsearch/backends/base.py b/wagtail/wagtailsearch/backends/base.py
index c971a4013..e7140c128 100644
--- a/wagtail/wagtailsearch/backends/base.py
+++ b/wagtail/wagtailsearch/backends/base.py
@@ -2,15 +2,9 @@ from six import text_type
from django.db import models
from django.db.models.query import QuerySet
-from django.core.exceptions import ImproperlyConfigured
-
-# Django 1.7 lookups
-try:
- from django.db.models.lookups import Lookup
-except ImportError:
- Lookup = None
-
+from django.db.models.lookups import Lookup
from django.db.models.sql.where import SubqueryConstraint, WhereNode
+from django.core.exceptions import ImproperlyConfigured
from wagtail.wagtailsearch.index import class_is_indexed
from wagtail.wagtailsearch.utils import normalise_query_string
@@ -71,15 +65,7 @@ class BaseSearchQuery(object):
def _get_filters_from_where_node(self, where_node):
# Check if this is a leaf node
- if isinstance(where_node, tuple): # Django 1.6 and below
- field_attname = where_node[0].col
- lookup = where_node[1]
- value = where_node[3]
-
- # Process the filter
- return self._process_filter(field_attname, lookup, value)
-
- elif Lookup is not None and isinstance(where_node, Lookup): # Django 1.7 and above
+ if isinstance(where_node, Lookup):
field_attname = where_node.lhs.target.attname
lookup = where_node.lookup_name
value = where_node.rhs
diff --git a/wagtail/wagtailsearch/south_migrations/0001_initial.py b/wagtail/wagtailsearch/south_migrations/0001_initial.py
deleted file mode 100644
index debca8fd9..000000000
--- a/wagtail/wagtailsearch/south_migrations/0001_initial.py
+++ /dev/null
@@ -1,178 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-from wagtail.wagtailcore.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME
-
-
-class Migration(SchemaMigration):
-
- depends_on = (
- ("wagtailcore", "0002_initial_data"),
- )
-
- def forwards(self, orm):
- # Adding model 'Query'
- db.create_table('wagtailsearch_query', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('query_string', self.gf('django.db.models.fields.CharField')
- (unique=True, max_length=255)),
- ))
- db.send_create_signal('wagtailsearch', ['Query'])
-
- # Adding model 'QueryDailyHits'
- db.create_table('wagtailsearch_querydailyhits', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('query', self.gf('django.db.models.fields.related.ForeignKey')
- (related_name='daily_hits', to=orm['wagtailsearch.Query'])),
- ('date', self.gf('django.db.models.fields.DateField')()),
- ('hits', self.gf('django.db.models.fields.IntegerField')(default=0)),
- ))
- db.send_create_signal('wagtailsearch', ['QueryDailyHits'])
-
- # Adding unique constraint on 'QueryDailyHits', fields ['query',
- # 'date']
- db.create_unique('wagtailsearch_querydailyhits', ['query_id', 'date'])
-
- # Adding model 'EditorsPick'
- db.create_table('wagtailsearch_editorspick', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('query', self.gf('django.db.models.fields.related.ForeignKey')
- (related_name='editors_picks', to=orm['wagtailsearch.Query'])),
- ('page', self.gf('django.db.models.fields.related.ForeignKey')
- (to=orm['wagtailcore.Page'])),
- ('sort_order', self.gf('django.db.models.fields.IntegerField')
- (null=True, blank=True)),
- ('description', self.gf('django.db.models.fields.TextField')(blank=True)),
- ))
- db.send_create_signal('wagtailsearch', ['EditorsPick'])
-
- # Adding model 'SearchTest'
- db.create_table('wagtailsearch_searchtest', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('title', self.gf('django.db.models.fields.CharField')(max_length=255)),
- ('content', self.gf('django.db.models.fields.TextField')()),
- ))
- db.send_create_signal('wagtailsearch', ['SearchTest'])
-
- # Adding model 'SearchTestChild'
- db.create_table('wagtailsearch_searchtestchild', (
- ('searchtest_ptr', self.gf('django.db.models.fields.related.OneToOneField')
- (to=orm[
- 'wagtailsearch.SearchTest'], unique=True, primary_key=True)),
- ('extra_content', self.gf('django.db.models.fields.TextField')()),
- ))
- db.send_create_signal('wagtailsearch', ['SearchTestChild'])
-
- def backwards(self, orm):
- # Removing unique constraint on 'QueryDailyHits', fields ['query',
- # 'date']
- db.delete_unique('wagtailsearch_querydailyhits', ['query_id', 'date'])
-
- # Deleting model 'Query'
- db.delete_table('wagtailsearch_query')
-
- # Deleting model 'QueryDailyHits'
- db.delete_table('wagtailsearch_querydailyhits')
-
- # Deleting model 'EditorsPick'
- db.delete_table('wagtailsearch_editorspick')
-
- # Deleting model 'SearchTest'
- db.delete_table('wagtailsearch_searchtest')
-
- # Deleting model 'SearchTestChild'
- db.delete_table('wagtailsearch_searchtestchild')
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- AUTH_USER_MODEL: {
- 'Meta': {'object_name': AUTH_USER_MODEL_NAME},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Permission']"}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- },
- 'wagtailcore.page': {
- 'Meta': {'object_name': 'Page'},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['contenttypes.ContentType']"}),
- 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}),
- 'has_unpublished_changes': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'live': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
- 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'owned_pages'", 'null': 'True', 'to': "orm['%s']" % AUTH_USER_MODEL}),
- 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'search_description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'seo_title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
- 'show_in_menus': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'url_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
- },
- 'wagtailsearch.editorspick': {
- 'Meta': {'ordering': "('sort_order',)", 'object_name': 'EditorsPick'},
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['wagtailcore.Page']"}),
- 'query': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'editors_picks'", 'to': "orm['wagtailsearch.Query']"}),
- 'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
- },
- 'wagtailsearch.query': {
- 'Meta': {'object_name': 'Query'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'query_string': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
- },
- 'wagtailsearch.querydailyhits': {
- 'Meta': {'unique_together': "(('query', 'date'),)", 'object_name': 'QueryDailyHits'},
- 'date': ('django.db.models.fields.DateField', [], {}),
- 'hits': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'query': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'daily_hits'", 'to': "orm['wagtailsearch.Query']"})
- },
- 'wagtailsearch.searchtest': {
- 'Meta': {'object_name': 'SearchTest'},
- 'content': ('django.db.models.fields.TextField', [], {}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- 'wagtailsearch.searchtestchild': {
- 'Meta': {'object_name': 'SearchTestChild', '_ormbases': ['wagtailsearch.SearchTest']},
- 'extra_content': ('django.db.models.fields.TextField', [], {}),
- 'searchtest_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['wagtailsearch.SearchTest']", 'unique': 'True', 'primary_key': 'True'})
- }
- }
-
- complete_apps = ['wagtailsearch']
diff --git a/wagtail/wagtailsearch/south_migrations/0002_auto__add_field_searchtest_live.py b/wagtail/wagtailsearch/south_migrations/0002_auto__add_field_searchtest_live.py
deleted file mode 100644
index 15aabc051..000000000
--- a/wagtail/wagtailsearch/south_migrations/0002_auto__add_field_searchtest_live.py
+++ /dev/null
@@ -1,114 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-from wagtail.wagtailcore.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME
-
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
- # Adding field 'SearchTest.live'
- db.add_column('wagtailsearch_searchtest', 'live',
- self.gf('django.db.models.fields.BooleanField')(default=False),
- keep_default=False)
-
-
- def backwards(self, orm):
- # Deleting field 'SearchTest.live'
- db.delete_column('wagtailsearch_searchtest', 'live')
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- AUTH_USER_MODEL: {
- 'Meta': {'object_name': AUTH_USER_MODEL_NAME},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Permission']"}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- },
- 'wagtailcore.page': {
- 'Meta': {'object_name': 'Page'},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['contenttypes.ContentType']"}),
- 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}),
- 'has_unpublished_changes': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'live': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
- 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'owned_pages'", 'null': 'True', 'to': "orm['%s']" % AUTH_USER_MODEL}),
- 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'search_description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'seo_title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
- 'show_in_menus': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'url_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
- },
- 'wagtailsearch.editorspick': {
- 'Meta': {'ordering': "('sort_order',)", 'object_name': 'EditorsPick'},
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['wagtailcore.Page']"}),
- 'query': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'editors_picks'", 'to': "orm['wagtailsearch.Query']"}),
- 'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
- },
- 'wagtailsearch.query': {
- 'Meta': {'object_name': 'Query'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'query_string': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
- },
- 'wagtailsearch.querydailyhits': {
- 'Meta': {'unique_together': "(('query', 'date'),)", 'object_name': 'QueryDailyHits'},
- 'date': ('django.db.models.fields.DateField', [], {}),
- 'hits': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'query': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'daily_hits'", 'to': "orm['wagtailsearch.Query']"})
- },
- 'wagtailsearch.searchtest': {
- 'Meta': {'object_name': 'SearchTest'},
- 'content': ('django.db.models.fields.TextField', [], {}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'live': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
- },
- 'wagtailsearch.searchtestchild': {
- 'Meta': {'object_name': 'SearchTestChild', '_ormbases': ['wagtailsearch.SearchTest']},
- 'extra_content': ('django.db.models.fields.TextField', [], {}),
- 'searchtest_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['wagtailsearch.SearchTest']", 'unique': 'True', 'primary_key': 'True'})
- }
- }
-
- complete_apps = ['wagtailsearch']
diff --git a/wagtail/wagtailsearch/south_migrations/0003_auto__del_searchtestchild__del_searchtest.py b/wagtail/wagtailsearch/south_migrations/0003_auto__del_searchtestchild__del_searchtest.py
deleted file mode 100644
index 6826ddaa1..000000000
--- a/wagtail/wagtailsearch/south_migrations/0003_auto__del_searchtestchild__del_searchtest.py
+++ /dev/null
@@ -1,114 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
- # Deleting model 'SearchTestChild'
- db.delete_table('wagtailsearch_searchtestchild')
-
- # Deleting model 'SearchTest'
- db.delete_table('wagtailsearch_searchtest')
-
-
- def backwards(self, orm):
- # Adding model 'SearchTestChild'
- db.create_table('wagtailsearch_searchtestchild', (
- ('extra_content', self.gf('django.db.models.fields.TextField')()),
- ('searchtest_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['wagtailsearch.SearchTest'], unique=True, primary_key=True)),
- ))
- db.send_create_signal('wagtailsearch', ['SearchTestChild'])
-
- # Adding model 'SearchTest'
- db.create_table('wagtailsearch_searchtest', (
- ('content', self.gf('django.db.models.fields.TextField')()),
- ('live', self.gf('django.db.models.fields.BooleanField')(default=False)),
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('title', self.gf('django.db.models.fields.CharField')(max_length=255)),
- ))
- db.send_create_signal('wagtailsearch', ['SearchTest'])
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Permission']"}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- },
- 'wagtailcore.page': {
- 'Meta': {'object_name': 'Page'},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['contenttypes.ContentType']"}),
- 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}),
- 'has_unpublished_changes': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'live': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
- 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'owned_pages'", 'null': 'True', 'to': "orm['auth.User']"}),
- 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
- 'search_description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'seo_title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
- 'show_in_menus': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
- 'url_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
- },
- 'wagtailsearch.editorspick': {
- 'Meta': {'ordering': "('sort_order',)", 'object_name': 'EditorsPick'},
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['wagtailcore.Page']"}),
- 'query': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'editors_picks'", 'to': "orm['wagtailsearch.Query']"}),
- 'sort_order': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
- },
- 'wagtailsearch.query': {
- 'Meta': {'object_name': 'Query'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'query_string': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})
- },
- 'wagtailsearch.querydailyhits': {
- 'Meta': {'unique_together': "(('query', 'date'),)", 'object_name': 'QueryDailyHits'},
- 'date': ('django.db.models.fields.DateField', [], {}),
- 'hits': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'query': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'daily_hits'", 'to': "orm['wagtailsearch.Query']"})
- }
- }
-
- complete_apps = ['wagtailsearch']
\ No newline at end of file
diff --git a/wagtail/wagtailsearch/south_migrations/__init__.py b/wagtail/wagtailsearch/south_migrations/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/wagtail/wagtailsearch/tests/test_backends.py b/wagtail/wagtailsearch/tests/test_backends.py
index 471426c19..aad3ee8d8 100644
--- a/wagtail/wagtailsearch/tests/test_backends.py
+++ b/wagtail/wagtailsearch/tests/test_backends.py
@@ -1,12 +1,13 @@
from six import StringIO
import warnings
+import unittest
from django.test import TestCase
from django.test.utils import override_settings
from django.conf import settings
from django.core import management
-from wagtail.tests.utils import unittest, WagtailTestUtils
+from wagtail.tests.utils import WagtailTestUtils
from wagtail.tests import models
from wagtail.wagtailsearch.backends import get_search_backend, InvalidSearchBackendError
from wagtail.wagtailsearch.backends.db import DBSearch
diff --git a/wagtail/wagtailsearch/tests/test_db_backend.py b/wagtail/wagtailsearch/tests/test_db_backend.py
index f471a34d1..909b4ae85 100644
--- a/wagtail/wagtailsearch/tests/test_db_backend.py
+++ b/wagtail/wagtailsearch/tests/test_db_backend.py
@@ -1,4 +1,4 @@
-from wagtail.tests.utils import unittest
+import unittest
from django.test import TestCase
diff --git a/wagtail/wagtailsearch/tests/test_elasticsearch_backend.py b/wagtail/wagtailsearch/tests/test_elasticsearch_backend.py
index b612f1ce3..44c653bbe 100644
--- a/wagtail/wagtailsearch/tests/test_elasticsearch_backend.py
+++ b/wagtail/wagtailsearch/tests/test_elasticsearch_backend.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
-from wagtail.tests.utils import unittest
+import unittest
import datetime
import json
diff --git a/wagtail/wagtailusers/south_migrations/0001_initial.py b/wagtail/wagtailusers/south_migrations/0001_initial.py
deleted file mode 100644
index 66a35cd76..000000000
--- a/wagtail/wagtailusers/south_migrations/0001_initial.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
- pass
-
- def backwards(self, orm):
- pass
-
- models = {
-
- }
-
- complete_apps = ['wagtailusers']
\ No newline at end of file
diff --git a/wagtail/wagtailusers/south_migrations/0002_add_user_profile_model.py b/wagtail/wagtailusers/south_migrations/0002_add_user_profile_model.py
deleted file mode 100644
index 239efa5f3..000000000
--- a/wagtail/wagtailusers/south_migrations/0002_add_user_profile_model.py
+++ /dev/null
@@ -1,78 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-from wagtail.wagtailcore.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME
-
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
- # Adding model 'UserProfile'
- db.create_table('wagtailusers_userprofile', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('user', self.gf('django.db.models.fields.related.OneToOneField')(to=orm[AUTH_USER_MODEL], unique=True)),
- ('submitted_notifications', self.gf('django.db.models.fields.BooleanField')(default=True)),
- ('rejected_notifications', self.gf('django.db.models.fields.BooleanField')(default=True)),
- ('approved_notifications', self.gf('django.db.models.fields.BooleanField')(default=True)),
- ))
- db.send_create_signal('wagtailusers', ['UserProfile'])
-
-
- def backwards(self, orm):
- # Deleting model 'UserProfile'
- db.delete_table('wagtailusers_userprofile')
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- AUTH_USER_MODEL: {
- 'Meta': {'object_name': AUTH_USER_MODEL_NAME},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Group']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'user_set'", 'blank': 'True', 'to': "orm['auth.Permission']"}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- },
- 'wagtailusers.userprofile': {
- 'Meta': {'object_name': 'UserProfile'},
- 'approved_notifications': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'rejected_notifications': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'submitted_notifications': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['%s']" % AUTH_USER_MODEL, 'unique': 'True'})
- }
- }
-
- complete_apps = ['wagtailusers']
\ No newline at end of file
diff --git a/wagtail/wagtailusers/south_migrations/__init__.py b/wagtail/wagtailusers/south_migrations/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/wagtail/wagtailusers/tests.py b/wagtail/wagtailusers/tests.py
index 1759c3c76..43e52a73e 100644
--- a/wagtail/wagtailusers/tests.py
+++ b/wagtail/wagtailusers/tests.py
@@ -1,14 +1,17 @@
from __future__ import unicode_literals
+
+import unittest
+import six
+
from django.test import TestCase
from django.core.urlresolvers import reverse
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Group, Permission
-from wagtail.tests.utils import WagtailTestUtils, unittest
+from wagtail.tests.utils import WagtailTestUtils
from wagtail.wagtailcore import hooks
from wagtail.wagtailusers.models import UserProfile
from wagtail.wagtailcore.models import Page, GroupPagePermission
-import six
class TestUserIndexView(TestCase, WagtailTestUtils):