diff --git a/.travis.yml b/.travis.yml index 5785646b..336211ec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,9 +3,8 @@ sudo: false python: - "2.7" env: - - DJANGO="Django>=1.6.0,<1.7.0" - - DJANGO="Django>=1.7.0,<1.8.0" - DJANGO="Django>=1.8.0,<1.9.0" + - DJANGO="Django>=1.9.0,<1.10.0" # command to install dependencies install: diff --git a/pagetree/__init__.py b/pagetree/__init__.py index c5264eb8..e69de29b 100644 --- a/pagetree/__init__.py +++ b/pagetree/__init__.py @@ -1,3 +0,0 @@ -# This is required for south's syncdb to pick up TestBlock in -# Django 1.6 -from pagetree.test_models import * diff --git a/pagetree/generic/models.py b/pagetree/generic/models.py index 9e87d578..f6e6869d 100644 --- a/pagetree/generic/models.py +++ b/pagetree/generic/models.py @@ -1,10 +1,6 @@ from django import forms from django.db import models -try: - from django.contrib.contenttypes.fields import GenericRelation -except ImportError: - # Old location for django 1.6 - from django.contrib.contenttypes.generic import GenericRelation +from django.contrib.contenttypes.fields import GenericRelation from pagetree.models import PageBlock diff --git a/pagetree/models.py b/pagetree/models.py index c38087a8..314d730c 100644 --- a/pagetree/models.py +++ b/pagetree/models.py @@ -1,9 +1,5 @@ import random -try: - from django.apps import apps -except ImportError: - # Django <= 1.6 - from django.db.models import get_model +from django.apps import apps from django.contrib.auth.models import User from django.core.cache import cache from django.db import models @@ -12,7 +8,7 @@ from django.template.loader import get_template from django.http import Http404 from django.contrib.contenttypes.models import ContentType -from django.contrib.contenttypes import generic +from django.contrib.contenttypes.fields import GenericForeignKey from django.template.defaultfilters import slugify from json import dumps from treebeard.mp_tree import MP_Node @@ -676,7 +672,7 @@ class PageBlock(models.Model): content_type = models.ForeignKey(ContentType) object_id = models.PositiveIntegerField() - content_object = generic.GenericForeignKey('content_type', 'object_id') + content_object = GenericForeignKey('content_type', 'object_id') class Meta: ordering = ('section', 'ordinality',) diff --git a/pagetree/reports.py b/pagetree/reports.py index d86dcd87..8607af53 100644 --- a/pagetree/reports.py +++ b/pagetree/reports.py @@ -1,11 +1,7 @@ import abc from django.contrib.auth.models import User -try: - from django.apps import apps -except ImportError: - # Django <= 1.6 - from django.db import models +from django.apps import apps from django.contrib.contenttypes.models import ContentType diff --git a/pagetree/south_migrations/0001_initial.py b/pagetree/south_migrations/0001_initial.py deleted file mode 100644 index 626f4ef5..00000000 --- a/pagetree/south_migrations/0001_initial.py +++ /dev/null @@ -1,91 +0,0 @@ -# encoding: utf-8 -# flake8: noqa -import 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 'Hierarchy' - db.create_table('pagetree_hierarchy', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('name', self.gf('django.db.models.fields.CharField')(max_length=256)), - ('base_url', self.gf('django.db.models.fields.CharField')(default='', max_length=256)), - )) - db.send_create_signal('pagetree', ['Hierarchy']) - - # Adding model 'Section' - db.create_table('pagetree_section', ( - ('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)), - ('label', self.gf('django.db.models.fields.CharField')(max_length=256)), - ('slug', self.gf('django.db.models.fields.SlugField')(max_length=50, db_index=True)), - ('hierarchy', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['pagetree.Hierarchy'])), - )) - db.send_create_signal('pagetree', ['Section']) - - # Adding model 'PageBlock' - db.create_table('pagetree_pageblock', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('section', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['pagetree.Section'])), - ('ordinality', self.gf('django.db.models.fields.PositiveIntegerField')(default=1)), - ('label', self.gf('django.db.models.fields.CharField')(max_length=256, null=True, blank=True)), - ('content_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['contenttypes.ContentType'])), - ('object_id', self.gf('django.db.models.fields.PositiveIntegerField')()), - )) - db.send_create_signal('pagetree', ['PageBlock']) - - - def backwards(self, orm): - - # Deleting model 'Hierarchy' - db.delete_table('pagetree_hierarchy') - - # Deleting model 'Section' - db.delete_table('pagetree_section') - - # Deleting model 'PageBlock' - db.delete_table('pagetree_pageblock') - - - 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'}) - }, - 'pagetree.hierarchy': { - 'Meta': {'object_name': 'Hierarchy'}, - 'base_url': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '256'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '256'}) - }, - 'pagetree.pageblock': { - 'Meta': {'ordering': "('section', 'ordinality')", 'object_name': 'PageBlock'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}), - 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'ordinality': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Section']"}) - }, - 'pagetree.section': { - 'Meta': {'object_name': 'Section'}, - 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'hierarchy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Hierarchy']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '256'}), - 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), - 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}) - } - } - - complete_apps = ['pagetree'] diff --git a/pagetree/south_migrations/0002_auto__add_userlocation.py b/pagetree/south_migrations/0002_auto__add_userlocation.py deleted file mode 100644 index cd7bb554..00000000 --- a/pagetree/south_migrations/0002_auto__add_userlocation.py +++ /dev/null @@ -1,98 +0,0 @@ -# -*- coding: utf-8 -*- -# flake8: noqa -import 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 'UserLocation' - db.create_table('pagetree_userlocation', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('hierarchy', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['pagetree.Hierarchy'])), - ('path', self.gf('django.db.models.fields.CharField')(default='/', max_length=256)), - )) - db.send_create_signal('pagetree', ['UserLocation']) - - - def backwards(self, orm): - # Deleting model 'UserLocation' - db.delete_table('pagetree_userlocation') - - - 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', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - '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', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - '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'}) - }, - 'pagetree.hierarchy': { - 'Meta': {'object_name': 'Hierarchy'}, - 'base_url': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '256'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '256'}) - }, - 'pagetree.pageblock': { - 'Meta': {'ordering': "('section', 'ordinality')", 'object_name': 'PageBlock'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}), - 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'ordinality': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Section']"}) - }, - 'pagetree.section': { - 'Meta': {'object_name': 'Section'}, - 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'hierarchy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Hierarchy']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '256'}), - 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), - 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}) - }, - 'pagetree.userlocation': { - 'Meta': {'object_name': 'UserLocation'}, - 'hierarchy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Hierarchy']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'path': ('django.db.models.fields.CharField', [], {'default': "'/'", 'max_length': '256'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['pagetree'] diff --git a/pagetree/south_migrations/0003_auto__add_userpagevisit.py b/pagetree/south_migrations/0003_auto__add_userpagevisit.py deleted file mode 100644 index 03c05301..00000000 --- a/pagetree/south_migrations/0003_auto__add_userpagevisit.py +++ /dev/null @@ -1,109 +0,0 @@ -# -*- coding: utf-8 -*- -# flake8: noqa -import 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 'UserPageVisit' - db.create_table('pagetree_userpagevisit', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('section', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['pagetree.Section'])), - ('status', self.gf('django.db.models.fields.CharField')(default='incomplete', max_length=256)), - ('first_visit', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('last_visit', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), - )) - db.send_create_signal('pagetree', ['UserPageVisit']) - - - def backwards(self, orm): - # Deleting model 'UserPageVisit' - db.delete_table('pagetree_userpagevisit') - - - 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', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - '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', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - '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'}) - }, - 'pagetree.hierarchy': { - 'Meta': {'object_name': 'Hierarchy'}, - 'base_url': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '256'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '256'}) - }, - 'pagetree.pageblock': { - 'Meta': {'ordering': "('section', 'ordinality')", 'object_name': 'PageBlock'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}), - 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'ordinality': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Section']"}) - }, - 'pagetree.section': { - 'Meta': {'object_name': 'Section'}, - 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'hierarchy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Hierarchy']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '256'}), - 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), - 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}) - }, - 'pagetree.userlocation': { - 'Meta': {'object_name': 'UserLocation'}, - 'hierarchy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Hierarchy']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'path': ('django.db.models.fields.CharField', [], {'default': "'/'", 'max_length': '256'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'pagetree.userpagevisit': { - 'Meta': {'object_name': 'UserPageVisit'}, - 'first_visit': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_visit': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Section']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'incomplete'", 'max_length': '256'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['pagetree'] diff --git a/pagetree/south_migrations/0004_auto__add_field_pageblock_css_extra.py b/pagetree/south_migrations/0004_auto__add_field_pageblock_css_extra.py deleted file mode 100644 index c80907dc..00000000 --- a/pagetree/south_migrations/0004_auto__add_field_pageblock_css_extra.py +++ /dev/null @@ -1,104 +0,0 @@ -# -*- coding: utf-8 -*- -# flake8: noqa -import 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 'PageBlock.css_extra' - db.add_column('pagetree_pageblock', 'css_extra', - self.gf('django.db.models.fields.CharField')(max_length=256, null=True, blank=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'PageBlock.css_extra' - db.delete_column('pagetree_pageblock', 'css_extra') - - - 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', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - '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', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - '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'}) - }, - 'pagetree.hierarchy': { - 'Meta': {'object_name': 'Hierarchy'}, - 'base_url': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '256'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '256'}) - }, - 'pagetree.pageblock': { - 'Meta': {'ordering': "('section', 'ordinality')", 'object_name': 'PageBlock'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'css_extra': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}), - 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'ordinality': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Section']"}) - }, - 'pagetree.section': { - 'Meta': {'object_name': 'Section'}, - 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'hierarchy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Hierarchy']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '256'}), - 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), - 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}) - }, - 'pagetree.userlocation': { - 'Meta': {'object_name': 'UserLocation'}, - 'hierarchy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Hierarchy']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'path': ('django.db.models.fields.CharField', [], {'default': "'/'", 'max_length': '256'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'pagetree.userpagevisit': { - 'Meta': {'object_name': 'UserPageVisit'}, - 'first_visit': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_visit': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Section']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'incomplete'", 'max_length': '256'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['pagetree'] diff --git a/pagetree/south_migrations/0005_auto__add_version.py b/pagetree/south_migrations/0005_auto__add_version.py deleted file mode 100644 index 108daf2a..00000000 --- a/pagetree/south_migrations/0005_auto__add_version.py +++ /dev/null @@ -1,121 +0,0 @@ -# -*- coding: utf-8 -*- -# flake8: noqa -import 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 'Version' - db.create_table('pagetree_version', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('section', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['pagetree.Section'])), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), - ('saved_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), - ('activity', self.gf('django.db.models.fields.TextField')(default='', null=True, blank=True)), - ('data', self.gf('django.db.models.fields.TextField')(default='', null=True, blank=True)), - ('comment', self.gf('django.db.models.fields.TextField')(default='', null=True, blank=True)), - )) - db.send_create_signal('pagetree', ['Version']) - - - def backwards(self, orm): - # Deleting model 'Version' - db.delete_table('pagetree_version') - - - 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', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - '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', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - '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'}) - }, - 'pagetree.hierarchy': { - 'Meta': {'object_name': 'Hierarchy'}, - 'base_url': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '256'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '256'}) - }, - 'pagetree.pageblock': { - 'Meta': {'ordering': "('section', 'ordinality')", 'object_name': 'PageBlock'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'css_extra': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}), - 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'ordinality': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Section']"}) - }, - 'pagetree.section': { - 'Meta': {'object_name': 'Section'}, - 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'hierarchy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Hierarchy']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '256'}), - 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), - 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}) - }, - 'pagetree.userlocation': { - 'Meta': {'object_name': 'UserLocation'}, - 'hierarchy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Hierarchy']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'path': ('django.db.models.fields.CharField', [], {'default': "'/'", 'max_length': '256'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'pagetree.userpagevisit': { - 'Meta': {'object_name': 'UserPageVisit'}, - 'first_visit': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_visit': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Section']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'incomplete'", 'max_length': '256'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'pagetree.version': { - 'Meta': {'ordering': "['-saved_at']", 'object_name': 'Version'}, - 'activity': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), - 'data': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'saved_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Section']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['pagetree'] diff --git a/pagetree/south_migrations/0006_auto__add_unique_userpagevisit_section_user.py b/pagetree/south_migrations/0006_auto__add_unique_userpagevisit_section_user.py deleted file mode 100644 index 3357531b..00000000 --- a/pagetree/south_migrations/0006_auto__add_unique_userpagevisit_section_user.py +++ /dev/null @@ -1,112 +0,0 @@ -# flake8: noqa -# -*- coding: utf-8 -*- -import 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 'UserPageVisit', fields ['section', 'user'] - db.create_unique('pagetree_userpagevisit', ['section_id', 'user_id']) - - - def backwards(self, orm): - # Removing unique constraint on 'UserPageVisit', fields ['section', 'user'] - db.delete_unique('pagetree_userpagevisit', ['section_id', 'user_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': { - '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', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - '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', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - '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'}) - }, - 'pagetree.hierarchy': { - 'Meta': {'object_name': 'Hierarchy'}, - 'base_url': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '256'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '256'}) - }, - 'pagetree.pageblock': { - 'Meta': {'ordering': "('section', 'ordinality')", 'object_name': 'PageBlock'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'css_extra': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}), - 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'ordinality': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Section']"}) - }, - 'pagetree.section': { - 'Meta': {'object_name': 'Section'}, - 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'hierarchy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Hierarchy']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '256'}), - 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), - 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}) - }, - 'pagetree.userlocation': { - 'Meta': {'object_name': 'UserLocation'}, - 'hierarchy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Hierarchy']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'path': ('django.db.models.fields.CharField', [], {'default': "'/'", 'max_length': '256'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'pagetree.userpagevisit': { - 'Meta': {'unique_together': "(('user', 'section'),)", 'object_name': 'UserPageVisit'}, - 'first_visit': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_visit': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Section']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'incomplete'", 'max_length': '256'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'pagetree.version': { - 'Meta': {'ordering': "['-saved_at']", 'object_name': 'Version'}, - 'activity': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), - 'data': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'saved_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Section']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['pagetree'] diff --git a/pagetree/south_migrations/0007_auto__add_unique_userlocation_hierarchy_user.py b/pagetree/south_migrations/0007_auto__add_unique_userlocation_hierarchy_user.py deleted file mode 100644 index 361a94fb..00000000 --- a/pagetree/south_migrations/0007_auto__add_unique_userlocation_hierarchy_user.py +++ /dev/null @@ -1,112 +0,0 @@ -# flake8: noqa -# -*- coding: utf-8 -*- -import 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 'UserLocation', fields ['hierarchy', 'user'] - db.create_unique('pagetree_userlocation', ['hierarchy_id', 'user_id']) - - - def backwards(self, orm): - # Removing unique constraint on 'UserLocation', fields ['hierarchy', 'user'] - db.delete_unique('pagetree_userlocation', ['hierarchy_id', 'user_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': { - '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', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - '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', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - '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'}) - }, - 'pagetree.hierarchy': { - 'Meta': {'object_name': 'Hierarchy'}, - 'base_url': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '256'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '256'}) - }, - 'pagetree.pageblock': { - 'Meta': {'ordering': "('section', 'ordinality')", 'object_name': 'PageBlock'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'css_extra': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}), - 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'ordinality': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Section']"}) - }, - 'pagetree.section': { - 'Meta': {'object_name': 'Section'}, - 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'hierarchy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Hierarchy']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '256'}), - 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), - 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}) - }, - 'pagetree.userlocation': { - 'Meta': {'unique_together': "(('user', 'hierarchy'),)", 'object_name': 'UserLocation'}, - 'hierarchy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Hierarchy']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'path': ('django.db.models.fields.CharField', [], {'default': "'/'", 'max_length': '256'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'pagetree.userpagevisit': { - 'Meta': {'unique_together': "(('user', 'section'),)", 'object_name': 'UserPageVisit'}, - 'first_visit': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_visit': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Section']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'incomplete'", 'max_length': '256'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'pagetree.version': { - 'Meta': {'ordering': "['-saved_at']", 'object_name': 'Version'}, - 'activity': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), - 'data': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'saved_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Section']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['pagetree'] diff --git a/pagetree/south_migrations/0008_auto__add_testblock.py b/pagetree/south_migrations/0008_auto__add_testblock.py deleted file mode 100644 index c7845e44..00000000 --- a/pagetree/south_migrations/0008_auto__add_testblock.py +++ /dev/null @@ -1,121 +0,0 @@ -# flake8: noqa -# -*- coding: utf-8 -*- -import 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 'TestBlock' - db.create_table('pagetree_testblock', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('body', self.gf('django.db.models.fields.TextField')(blank=True)), - )) - db.send_create_signal('pagetree', ['TestBlock']) - - - def backwards(self, orm): - # Deleting model 'TestBlock' - db.delete_table('pagetree_testblock') - - - 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', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - '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', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - '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'}) - }, - 'pagetree.hierarchy': { - 'Meta': {'object_name': 'Hierarchy'}, - 'base_url': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '256'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '256'}) - }, - 'pagetree.pageblock': { - 'Meta': {'ordering': "('section', 'ordinality')", 'object_name': 'PageBlock'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'css_extra': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}), - 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'ordinality': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Section']"}) - }, - 'pagetree.section': { - 'Meta': {'object_name': 'Section'}, - 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'hierarchy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Hierarchy']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '256'}), - 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), - 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}) - }, - 'pagetree.testblock': { - 'Meta': {'object_name': 'TestBlock'}, - 'body': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'pagetree.userlocation': { - 'Meta': {'unique_together': "(('user', 'hierarchy'),)", 'object_name': 'UserLocation'}, - 'hierarchy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Hierarchy']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'path': ('django.db.models.fields.CharField', [], {'default': "'/'", 'max_length': '256'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'pagetree.userpagevisit': { - 'Meta': {'unique_together': "(('user', 'section'),)", 'object_name': 'UserPageVisit'}, - 'first_visit': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_visit': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Section']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'incomplete'", 'max_length': '256'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'pagetree.version': { - 'Meta': {'ordering': "['-saved_at']", 'object_name': 'Version'}, - 'activity': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), - 'data': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'saved_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Section']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['pagetree'] diff --git a/pagetree/south_migrations/0009_auto__add_field_section_show_toc__add_field_section_deep_toc.py b/pagetree/south_migrations/0009_auto__add_field_section_show_toc__add_field_section_deep_toc.py deleted file mode 100644 index 63e77aac..00000000 --- a/pagetree/south_migrations/0009_auto__add_field_section_show_toc__add_field_section_deep_toc.py +++ /dev/null @@ -1,129 +0,0 @@ -# flake8: noqa -# -*- coding: utf-8 -*- -import 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 'Section.show_toc' - db.add_column('pagetree_section', 'show_toc', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - # Adding field 'Section.deep_toc' - db.add_column('pagetree_section', 'deep_toc', - self.gf('django.db.models.fields.BooleanField')(default=False), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'Section.show_toc' - db.delete_column('pagetree_section', 'show_toc') - - # Deleting field 'Section.deep_toc' - db.delete_column('pagetree_section', 'deep_toc') - - - 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', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - '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', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - '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'}) - }, - 'pagetree.hierarchy': { - 'Meta': {'object_name': 'Hierarchy'}, - 'base_url': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '256'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '256'}) - }, - 'pagetree.pageblock': { - 'Meta': {'ordering': "('section', 'ordinality')", 'object_name': 'PageBlock'}, - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'css_extra': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}), - 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'ordinality': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), - 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Section']"}) - }, - 'pagetree.section': { - 'Meta': {'object_name': 'Section'}, - 'deep_toc': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'depth': ('django.db.models.fields.PositiveIntegerField', [], {}), - 'hierarchy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Hierarchy']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'label': ('django.db.models.fields.CharField', [], {'max_length': '256'}), - 'numchild': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), - 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), - 'show_toc': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}) - }, - 'pagetree.testblock': { - 'Meta': {'object_name': 'TestBlock'}, - 'body': ('django.db.models.fields.TextField', [], {'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}) - }, - 'pagetree.userlocation': { - 'Meta': {'unique_together': "(('user', 'hierarchy'),)", 'object_name': 'UserLocation'}, - 'hierarchy': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Hierarchy']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'path': ('django.db.models.fields.CharField', [], {'default': "'/'", 'max_length': '256'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'pagetree.userpagevisit': { - 'Meta': {'unique_together': "(('user', 'section'),)", 'object_name': 'UserPageVisit'}, - 'first_visit': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'last_visit': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), - 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Section']"}), - 'status': ('django.db.models.fields.CharField', [], {'default': "'incomplete'", 'max_length': '256'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'pagetree.version': { - 'Meta': {'ordering': "['-saved_at']", 'object_name': 'Version'}, - 'activity': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), - 'comment': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), - 'data': ('django.db.models.fields.TextField', [], {'default': "''", 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'saved_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), - 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['pagetree.Section']"}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['pagetree'] diff --git a/pagetree/south_migrations/__init__.py b/pagetree/south_migrations/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/pagetree/tests/__init__.py b/pagetree/tests/__init__.py index b4f2389b..e69de29b 100644 --- a/pagetree/tests/__init__.py +++ b/pagetree/tests/__init__.py @@ -1,6 +0,0 @@ -# flake8: noqa -from .test_models import * -from .test_views import * -from .test_helpers import * -from .test_generic import * -from .test_reports import * diff --git a/runtests.py b/runtests.py index 6179d9dc..7dd3a596 100644 --- a/runtests.py +++ b/runtests.py @@ -35,11 +35,7 @@ def main(): COVERAGE_EXCLUDES_FOLDERS = ['migrations'], ROOT_URLCONF = 'pagetree.tests.urls', PAGEBLOCKS = ['pagetree.TestBlock', ], - SOUTH_TESTS_MIGRATE=False, - JENKINS_TASKS = ( - 'django_jenkins.tasks.with_coverage', - ), PROJECT_APPS = [ 'pagetree', ], @@ -56,15 +52,11 @@ def main(): }, ) - try: - # required by Django 1.7 and later - django.setup() - except AttributeError: - pass + django.setup() # Fire off the tests call_command('test') - call_command('jenkins') + call_command('jenkins', '--enable-coverage') if __name__ == '__main__': main() diff --git a/test_reqs.txt b/test_reqs.txt index 245dbb63..01ede4fa 100644 --- a/test_reqs.txt +++ b/test_reqs.txt @@ -1,9 +1,8 @@ django-treebeard==3.0 Markdown==2.6.2 -South==1.0.2 -coverage==3.7.1 +coverage==4.0.3 flake8==2.3.0 -django-jenkins==0.17.0 +django-jenkins==0.18.1 pep8==1.5.7 pyflakes==0.8.1 django-markwhat==1.3