Skip to content
Browse files

Removed migrations and stopped inheriting from contrib.redirects

  • Loading branch information...
1 parent c5fee55 commit 32aa82669569bb75e40c96e655c36effcfe236ca @MegaMark16 MegaMark16 committed Apr 13, 2011
View
80 cms_redirects/migrations/0001_initial.py
@@ -1,80 +0,0 @@
-# encoding: 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 'CMSRedirect'
- db.create_table('cms_redirects_cmsredirect', (
- ('redirect_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['redirects.Redirect'], unique=True, primary_key=True)),
- ('page_link', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['cms.Page'], null=True, blank=True)),
- ))
- db.send_create_signal('cms_redirects', ['CMSRedirect'])
-
-
- def backwards(self, orm):
-
- # Deleting model 'CMSRedirect'
- db.delete_table('cms_redirects_cmsredirect')
-
-
- models = {
- 'cms.page': {
- 'Meta': {'ordering': "('site', 'tree_id', 'lft')", 'object_name': 'Page'},
- 'changed_by': ('django.db.models.fields.CharField', [], {'max_length': '70'}),
- 'created_by': ('django.db.models.fields.CharField', [], {'max_length': '70'}),
- 'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'in_navigation': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}),
- 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'limit_visibility_in_menu': ('django.db.models.fields.SmallIntegerField', [], {'default': 'None', 'null': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'login_required': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'moderator_state': ('django.db.models.fields.SmallIntegerField', [], {'default': '1', 'blank': 'True'}),
- 'navigation_extenders': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '80', 'null': 'True', 'blank': 'True'}),
- 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['cms.Page']"}),
- 'placeholders': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['cms.Placeholder']", 'symmetrical': 'False'}),
- 'publication_date': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
- 'publication_end_date': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
- 'published': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'publisher_is_draft': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}),
- 'publisher_public': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'publisher_draft'", 'unique': 'True', 'null': 'True', 'to': "orm['cms.Page']"}),
- 'publisher_state': ('django.db.models.fields.SmallIntegerField', [], {'default': '0', 'db_index': 'True'}),
- 'reverse_id': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '40', 'null': 'True', 'blank': 'True'}),
- 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
- 'soft_root': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
- 'template': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
- },
- 'cms.placeholder': {
- 'Meta': {'object_name': 'Placeholder'},
- 'default_width': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'})
- },
- 'cms_redirects.cmsredirect': {
- 'Meta': {'ordering': "('old_path',)", 'object_name': 'CMSRedirect', '_ormbases': ['redirects.Redirect']},
- 'page_link': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Page']", 'null': 'True', 'blank': 'True'}),
- 'redirect_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['redirects.Redirect']", 'unique': 'True', 'primary_key': 'True'})
- },
- 'redirects.redirect': {
- 'Meta': {'ordering': "('old_path',)", 'unique_together': "(('site', 'old_path'),)", 'object_name': 'Redirect', 'db_table': "'django_redirect'"},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'new_path': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
- 'old_path': ('django.db.models.fields.CharField', [], {'max_length': '200', 'db_index': 'True'}),
- 'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"})
- },
- 'sites.site': {
- 'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
- 'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- }
- }
-
- complete_apps = ['cms_redirects']
View
82 ...ects/migrations/0002_auto__del_field_cmsredirect_page_link__add_field_cmsredirect_page.py
@@ -1,82 +0,0 @@
-# encoding: 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):
-
- # Deleting field 'CMSRedirect.page_link'
- db.delete_column('cms_redirects_cmsredirect', 'page_link_id')
-
- # Adding field 'CMSRedirect.page'
- db.add_column('cms_redirects_cmsredirect', 'page', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['cms.Page'], null=True, blank=True), keep_default=False)
-
-
- def backwards(self, orm):
-
- # Adding field 'CMSRedirect.page_link'
- db.add_column('cms_redirects_cmsredirect', 'page_link', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['cms.Page'], null=True, blank=True), keep_default=False)
-
- # Deleting field 'CMSRedirect.page'
- db.delete_column('cms_redirects_cmsredirect', 'page_id')
-
-
- models = {
- 'cms.page': {
- 'Meta': {'ordering': "('site', 'tree_id', 'lft')", 'object_name': 'Page'},
- 'changed_by': ('django.db.models.fields.CharField', [], {'max_length': '70'}),
- 'created_by': ('django.db.models.fields.CharField', [], {'max_length': '70'}),
- 'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'in_navigation': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}),
- 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'limit_visibility_in_menu': ('django.db.models.fields.SmallIntegerField', [], {'default': 'None', 'null': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'login_required': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'moderator_state': ('django.db.models.fields.SmallIntegerField', [], {'default': '1', 'blank': 'True'}),
- 'navigation_extenders': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '80', 'null': 'True', 'blank': 'True'}),
- 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['cms.Page']"}),
- 'placeholders': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['cms.Placeholder']", 'symmetrical': 'False'}),
- 'publication_date': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
- 'publication_end_date': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
- 'published': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'publisher_is_draft': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'db_index': 'True'}),
- 'publisher_public': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'publisher_draft'", 'unique': 'True', 'null': 'True', 'to': "orm['cms.Page']"}),
- 'publisher_state': ('django.db.models.fields.SmallIntegerField', [], {'default': '0', 'db_index': 'True'}),
- 'reverse_id': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '40', 'null': 'True', 'blank': 'True'}),
- 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
- 'soft_root': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
- 'template': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
- },
- 'cms.placeholder': {
- 'Meta': {'object_name': 'Placeholder'},
- 'default_width': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'})
- },
- 'cms_redirects.cmsredirect': {
- 'Meta': {'ordering': "('old_path',)", 'object_name': 'CMSRedirect', '_ormbases': ['redirects.Redirect']},
- 'page': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Page']", 'null': 'True', 'blank': 'True'}),
- 'redirect_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['redirects.Redirect']", 'unique': 'True', 'primary_key': 'True'})
- },
- 'redirects.redirect': {
- 'Meta': {'ordering': "('old_path',)", 'unique_together': "(('site', 'old_path'),)", 'object_name': 'Redirect', 'db_table': "'django_redirect'"},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'new_path': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
- 'old_path': ('django.db.models.fields.CharField', [], {'max_length': '200', 'db_index': 'True'}),
- 'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"})
- },
- 'sites.site': {
- 'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
- 'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- }
- }
-
- complete_apps = ['cms_redirects']
View
0 cms_redirects/migrations/__init__.py
No changes.
View
1 cms_redirects/models.py
@@ -1,4 +1,5 @@
from django.db import models
+from django.contrib.sites.models import Site
from django.utils.translation import ugettext_lazy as _
from cms.models.fields import PageField

0 comments on commit 32aa826

Please sign in to comment.
Something went wrong with that request. Please try again.