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 attribute in orm.Attribute.objects.all():
12 attribute.value_json = attribute.json_value
16 def backwards(self, orm):
17 "Write your backwards methods here."
18 for attribute in orm.Attribute.objects.all():
19 attribute.json_value = attribute.value_json
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'),)", 'object_name': 'Attribute'},
33 'entity_content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
34 'entity_object_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
35 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
36 'json_value': ('django.db.models.fields.TextField', [], {}),
37 'key': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
38 'value': ('philo.models.fields.JSONField', [], {})
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'})
76 'Meta': {'object_name': 'Node'},
77 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
78 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Node']"}),
79 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}),
80 'view_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'node_view_set'", 'to': "orm['contenttypes.ContentType']"}),
81 'view_object_id': ('django.db.models.fields.PositiveIntegerField', [], {})
84 'Meta': {'object_name': 'Page'},
85 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
86 'template': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['philo.Template']"}),
87 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
90 'Meta': {'object_name': 'Redirect'},
91 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
92 'status_code': ('django.db.models.fields.IntegerField', [], {'default': '302'}),
93 'target': ('django.db.models.fields.CharField', [], {'max_length': '200'})
95 'philo.relationship': {
96 'Meta': {'unique_together': "(('key', 'entity_content_type', 'entity_object_id'),)", 'object_name': 'Relationship'},
97 'entity_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'relationship_entity_set'", 'to': "orm['contenttypes.ContentType']"}),
98 'entity_object_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
99 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
100 'key': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
101 'value_content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'relationship_value_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}),
102 'value_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'})
105 'Meta': {'object_name': 'Tag'},
106 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
107 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
108 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'})
111 'Meta': {'object_name': 'Template'},
112 'code': ('philo.models.fields.TemplateField', [], {}),
113 'documentation': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
114 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
115 'mimetype': ('django.db.models.fields.CharField', [], {'default': "'text/html'", 'max_length': '255'}),
116 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
117 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Template']"}),
118 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'})
122 complete_apps = ['philo']