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."
14 def backwards(self, orm):
15 "Write your backwards methods here."
16 PhiloTag = orm['philo.Tag']
17 Tag = orm['taggit.Tag']
19 for tag in Tag.objects.all():
20 PhiloTag.objects.get_or_create(name=tag.name, slug=tag.slug)
24 'contenttypes.contenttype': {
25 'Meta': {'ordering': "('name',)", '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', [], {'db_index': 'True'}),
35 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
36 'key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
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', [], {'db_index': 'True', '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', 'db_index': 'True'}),
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', 'db_index': 'True'}),
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', 'blank': 'True'}),
74 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'})
76 'philo.foreignkeyvalue': {
77 'Meta': {'object_name': 'ForeignKeyValue'},
78 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}),
79 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
80 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'})
83 'Meta': {'object_name': 'JSONValue'},
84 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
85 'value': ('philo.models.fields.JSONField', [], {'default': "'null'", 'db_index': 'True'})
87 'philo.manytomanyvalue': {
88 'Meta': {'object_name': 'ManyToManyValue'},
89 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}),
90 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
91 'values': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['philo.ForeignKeyValue']", 'null': 'True', 'blank': 'True'})
94 'Meta': {'unique_together': "(('parent', 'slug'),)", 'object_name': 'Node'},
95 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
96 'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
97 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
98 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['philo.Node']"}),
99 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
100 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '255', 'db_index': 'True'}),
101 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
102 'view_content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'node_view_set'", 'null': 'True', 'to': "orm['contenttypes.ContentType']"}),
103 'view_object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'})
106 'Meta': {'object_name': 'Page'},
107 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
108 'template': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'pages'", 'to': "orm['philo.Template']"}),
109 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
112 'Meta': {'object_name': 'Redirect'},
113 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
114 'reversing_parameters': ('philo.models.fields.JSONField', [], {'blank': 'True'}),
115 'status_code': ('django.db.models.fields.IntegerField', [], {'default': '302'}),
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': {'ordering': "('name',)", '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': {'unique_together': "(('parent', 'slug'),)", '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'})
140 'Meta': {'object_name': 'Tag'},
141 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
142 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
143 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100', 'db_index': 'True'})
145 'taggit.taggeditem': {
146 'Meta': {'object_name': 'TaggedItem'},
147 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}),
148 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
149 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
150 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"})
154 complete_apps = ['taggit', 'philo']