1 # -*- coding: utf-8 -*-
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 orm.Level.objects.all().update(meta_name=models.F('slug'))
13 def backwards(self, orm):
14 "Write your backwards methods here."
17 u'curriculum.competence': {
18 'Meta': {'ordering': "['section', 'order']", 'object_name': 'Competence'},
19 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
20 'name_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
21 'name_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
22 'order': ('django.db.models.fields.IntegerField', [], {}),
23 'section': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Section']"}),
24 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
26 u'curriculum.competencelevel': {
27 'Meta': {'ordering': "['competence', 'level']", 'object_name': 'CompetenceLevel'},
28 'competence': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Competence']"}),
29 'description_en': ('django.db.models.fields.TextField', [], {'default': "''"}),
30 'description_pl': ('django.db.models.fields.TextField', [], {'default': "''"}),
31 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
32 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.Level']"})
34 u'curriculum.curriculum': {
35 'Meta': {'object_name': 'Curriculum'},
36 'course': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.CurriculumCourse']"}),
37 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
38 'identifier': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
39 'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['curriculum.CurriculumLevel']"}),
40 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
41 'type': ('django.db.models.fields.CharField', [], {'max_length': '16'})
43 u'curriculum.curriculumcourse': {
44 'Meta': {'ordering': "['slug']", 'object_name': 'CurriculumCourse'},
45 'accusative': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
46 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
47 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}),
48 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
50 u'curriculum.curriculumlevel': {
51 'Meta': {'object_name': 'CurriculumLevel'},
52 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
53 'title': ('django.db.models.fields.CharField', [], {'max_length': '16', 'db_index': 'True'})
55 u'curriculum.level': {
56 'Meta': {'ordering': "['order']", 'object_name': 'Level'},
57 'group_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
58 'group_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
59 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
60 'meta_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
61 'name_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
62 'name_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
63 'order': ('django.db.models.fields.IntegerField', [], {}),
64 'slug': ('django.db.models.fields.CharField', [], {'max_length': '255'})
66 u'curriculum.section': {
67 'Meta': {'ordering': "['order']", 'object_name': 'Section'},
68 u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
69 'name_en': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
70 'name_pl': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
71 'order': ('django.db.models.fields.IntegerField', [], {}),
72 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
76 complete_apps = ['curriculum']