3 from south.db import db
4 from south.v2 import DataMigration
5 from django.db import models
7 class Migration(DataMigration):
9 def forwards(self, orm):
10 "Write your forwards methods here."
11 for redirect in orm.Redirect.objects.all():
12 redirect.url_or_subpath = redirect.target
16 def backwards(self, orm):
17 "This will cause data loss and is not advisable. Blurg!"
18 for redirect in orm.Redirect.objects.all():
19 redirect.target = redirect.url_or_subpath
24 'contenttypes.contenttype': {
25 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
26 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
27 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
28 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
29 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
32 'Meta': {'unique_together': "(('key', 'entity_content_type', 'entity_object_id'), ('value_content_type', 'value_object_id'))", 'object_name': 'Attribute'},
33 'entity_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'attribute_entity_set'", 'to': "orm['contenttypes.ContentType']"}),
34 'entity_object_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
35 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
36 'key': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
37 'value_content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'attribute_value_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}),
38 'value_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'})
41 'Meta': {'object_name': 'Collection'},
42 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
43 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
44 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'})
46 'philo.collectionmember': {
47 'Meta': {'object_name': 'CollectionMember'},
48 'collection': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'members'", 'to': "orm['philo.Collection']"}),
49 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
50 'index': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
51 'member_content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
52 'member_object_id': ('django.db.models.fields.PositiveIntegerField', [], {})
55 'Meta': {'object_name': 'Contentlet'},
56 'content': ('philo.models.fields.TemplateField', [], {}),
57 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
58 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
59 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'contentlets'", 'to': "orm['philo.Page']"})
61 'philo.contentreference': {
62 'Meta': {'object_name': 'ContentReference'},
63 'content_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
64 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
65 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
66 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
67 'page': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'contentreferences'", 'to': "orm['philo.Page']"})
70 'Meta': {'object_name': 'File'},
71 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
72 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
73 'mimetype': ('django.db.models.fields.CharField', [], {'max_length': '255'})
75 'philo.foreignkeyvalue': {
76 'Meta': {'object_name': 'ForeignKeyValue'},
77 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}),
78 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
79 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'})
82 'Meta': {'object_name': 'JSONValue'},
83 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
84 'value': ('philo.models.fields.JSONField', [], {'default': "'null'"})
86 'philo.manytomanyvalue': {
87 'Meta': {'object_name': 'ManyToManyValue'},
88 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}),
89 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
90 'values': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['philo.ForeignKeyValue']", 'null': 'True', 'blank': 'True'})
93 'Meta': {'object_name': 'Node'},
94 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
95 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
96 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
97 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Node']"}),
98 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
99 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}),
100 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
101 'view_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'node_view_set'", 'to': "orm['contenttypes.ContentType']"}),
102 'view_object_id': ('django.db.models.fields.PositiveIntegerField', [], {})
105 'Meta': {'object_name': 'Page'},
106 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
107 'template': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['philo.Template']"}),
108 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
111 'Meta': {'object_name': 'Redirect'},
112 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
113 'reversing_parameters': ('philo.models.fields.JSONField', [], {'blank': 'True'}),
114 'status_code': ('django.db.models.fields.IntegerField', [], {'default': '302'}),
115 'target': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
116 'target_node': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'philo_redirect_related'", 'null': 'True', 'to': "orm['philo.Node']"}),
117 'url_or_subpath': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'})
120 'Meta': {'object_name': 'Tag'},
121 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
122 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
123 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'})
126 'Meta': {'object_name': 'Template'},
127 'code': ('philo.models.fields.TemplateField', [], {}),
128 'documentation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
129 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
130 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
131 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
132 'mimetype': ('django.db.models.fields.CharField', [], {'default': "'text/html'", 'max_length': '255'}),
133 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
134 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Template']"}),
135 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
136 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}),
137 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
141 complete_apps = ['philo']