0002_flat_pages.py 1.12 KB
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models


class Migration(DataMigration):

    def forwards(self, orm):
        pages = [
            ('help', u'Pomoc'),
            ('about', u'O Słowniku'),
            ('pattern_system', u'Systematyzacja wzorów fleksyjnych'),
            ('symbols', u'Oznaczenia stosowane w Słowniku'),
        ]
        for text_id, title in pages:
            orm.FlatPage.objects.create(text_id=text_id, title=title)

    def backwards(self, orm):
        orm.FlatPage.objects.all().delete()

    models = {
        u'common.flatpage': {
            'Meta': {'object_name': 'FlatPage'},
            'html_content': ('django.db.models.fields.TextField', [], {}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'text_id': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
            'title': ('django.db.models.fields.CharField', [], {'max_length': '160'})
        }
    }

    complete_apps = ['common']
    symmetrical = True