Cloudcmsfaq services as primary category
[snf-cloudcms] / cloudcms / migrate / cloudcmsfaq / 0005_auto__add_field_question_service.py
1 # -*- coding: utf-8 -*-
2 import datetime
3 from south.db import db
4 from south.v2 import SchemaMigration
5 from django.db import models
6
7
8 class Migration(SchemaMigration):
9
10     def forwards(self, orm):
11         # Adding field 'Question.service'
12         db.add_column('cloudcmsfaq_question', 'service',
13                       self.gf('django.db.models.fields.related.ForeignKey')(related_name='faqs', null=True, to=orm['cloudcms.Service']),
14                       keep_default=False)
15
16
17     def backwards(self, orm):
18         # Deleting field 'Question.service'
19         db.delete_column('cloudcmsfaq_question', 'service_id')
20
21
22     models = {
23         'auth.group': {
24             'Meta': {'object_name': 'Group'},
25             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
26             'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
27             'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
28         },
29         'auth.permission': {
30             'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
31             'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
32             'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
33             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
34             'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
35         },
36         'auth.user': {
37             'Meta': {'object_name': 'User'},
38             'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
39             'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
40             'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
41             'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
42             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
43             'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
44             'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
45             'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
46             'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
47             'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
48             'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
49             'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
50             'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
51         },
52         'cloudcms.application': {
53             'Meta': {'object_name': 'Application'},
54             'app_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
55             'code': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
56             'extra_styles': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
57             'facebook_username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
58             'favicon': ('feincms.module.medialibrary.fields.MediaFileForeignKey', [], {'blank': 'True', 'related_name': "'as_favicon'", 'null': 'True', 'to': "orm['medialibrary.MediaFile']"}),
59             'footer_bottom': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
60             'footer_top': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
61             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
62             'index_url': ('django.db.models.fields.CharField', [], {'default': "'/'", 'max_length': '255'}),
63             'linked_in_username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
64             'logo': ('feincms.module.medialibrary.fields.MediaFileForeignKey', [], {'to': "orm['medialibrary.MediaFile']", 'null': 'True', 'blank': 'True'}),
65             'show_twitter_feed_on_top': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
66             'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
67             'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
68             'twitter_username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
69         },
70         'cloudcms.service': {
71             'Meta': {'ordering': "['-ordering']", 'object_name': 'Service'},
72             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
73             'ordering': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'})
74         },
75         'cloudcmsfaq.category': {
76             'Meta': {'ordering': "['-ordering']", 'object_name': 'Category'},
77             'display_on_menu': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
78             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
79             'ordering': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'})
80         },
81         'cloudcmsfaq.categorytranslation': {
82             'Meta': {'ordering': "['title']", 'object_name': 'CategoryTranslation'},
83             'description': ('django.db.models.fields.CharField', [], {'max_length': '250', 'blank': 'True'}),
84             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
85             'language_code': ('django.db.models.fields.CharField', [], {'default': "'en'", 'max_length': '10'}),
86             'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'translations'", 'to': "orm['cloudcmsfaq.Category']"}),
87             'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
88             'title': ('django.db.models.fields.CharField', [], {'max_length': '100'})
89         },
90         'cloudcmsfaq.imagecontent': {
91             'Meta': {'ordering': "['ordering']", 'object_name': 'ImageContent', 'db_table': "'cloudcmsfaq_question_imagecontent'"},
92             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
93             'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
94             'ordering': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
95             'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'imagecontent_set'", 'to': "orm['cloudcmsfaq.Question']"}),
96             'position': ('django.db.models.fields.CharField', [], {'default': "'default'", 'max_length': '10'}),
97             'region': ('django.db.models.fields.CharField', [], {'max_length': '255'})
98         },
99         'cloudcmsfaq.question': {
100             'Meta': {'ordering': "['-published_on']", 'object_name': 'Question'},
101             'application': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'faqs'", 'symmetrical': 'False', 'to': "orm['cloudcms.Application']"}),
102             'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'faqs'", 'to': "orm['auth.User']"}),
103             'category': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'faqs'", 'to': "orm['cloudcmsfaq.Category']"}),
104             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
105             'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
106             'is_featured': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
107             'language': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
108             'last_changed': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
109             'published_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'null': 'True', 'blank': 'True'}),
110             'service': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'faqs'", 'null': 'True', 'to': "orm['cloudcms.Service']"}),
111             'slug': ('django.db.models.fields.SlugField', [], {'max_length': '100'}),
112             'title': ('django.db.models.fields.CharField', [], {'max_length': '100'})
113         },
114         'cloudcmsfaq.rawcontent': {
115             'Meta': {'ordering': "['ordering']", 'object_name': 'RawContent', 'db_table': "'cloudcmsfaq_question_rawcontent'"},
116             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
117             'ordering': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
118             'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rawcontent_set'", 'to': "orm['cloudcmsfaq.Question']"}),
119             'region': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
120             'text': ('django.db.models.fields.TextField', [], {'blank': 'True'})
121         },
122         'cloudcmsfaq.richtextcontent': {
123             'Meta': {'ordering': "['ordering']", 'object_name': 'RichTextContent', 'db_table': "'cloudcmsfaq_question_richtextcontent'"},
124             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
125             'ordering': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
126             'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'richtextcontent_set'", 'to': "orm['cloudcmsfaq.Question']"}),
127             'region': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
128             'text': ('django.db.models.fields.TextField', [], {'blank': 'True'})
129         },
130         'cloudcmsfaq.sectioncontent': {
131             'Meta': {'ordering': "['ordering']", 'object_name': 'SectionContent', 'db_table': "'cloudcmsfaq_question_sectioncontent'"},
132             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
133             'mediafile': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'cloudcmsfaq_sectioncontent_set'", 'null': 'True', 'to': "orm['medialibrary.MediaFile']"}),
134             'ordering': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
135             'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sectioncontent_set'", 'to': "orm['cloudcmsfaq.Question']"}),
136             'region': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
137             'richtext': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
138             'title': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
139             'type': ('django.db.models.fields.CharField', [], {'default': "'block'", 'max_length': '10'})
140         },
141         'cloudcmsfaq.templatecontent': {
142             'Meta': {'ordering': "['ordering']", 'object_name': 'TemplateContent', 'db_table': "'cloudcmsfaq_question_templatecontent'"},
143             'filename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
144             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
145             'ordering': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
146             'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'templatecontent_set'", 'to': "orm['cloudcmsfaq.Question']"}),
147             'region': ('django.db.models.fields.CharField', [], {'max_length': '255'})
148         },
149         'contenttypes.contenttype': {
150             'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
151             'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
152             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
153             'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
154             'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
155         },
156         'medialibrary.category': {
157             'Meta': {'ordering': "['parent__title', 'title']", 'object_name': 'Category'},
158             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
159             'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['medialibrary.Category']"}),
160             'slug': ('django.db.models.fields.SlugField', [], {'max_length': '150'}),
161             'title': ('django.db.models.fields.CharField', [], {'max_length': '200'})
162         },
163         'medialibrary.mediafile': {
164             'Meta': {'object_name': 'MediaFile'},
165             'categories': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['medialibrary.Category']", 'null': 'True', 'blank': 'True'}),
166             'copyright': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
167             'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
168             'file': ('django.db.models.fields.files.FileField', [], {'max_length': '255'}),
169             'file_size': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
170             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
171             'type': ('django.db.models.fields.CharField', [], {'max_length': '12'})
172         },
173         'sites.site': {
174             'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
175             'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
176             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
177             'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
178         }
179     }
180
181     complete_apps = ['cloudcmsfaq']