X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/5f176bb52a7a59bf88f5728e60a3a62e12fb3d54..bf3f18ce9313f4929ff327fbf12803157de171cb:/apps/polls/migrations/0001_initial.py?ds=sidebyside diff --git a/apps/polls/migrations/0001_initial.py b/apps/polls/migrations/0001_initial.py index e5550b097..91c68aa00 100644 --- a/apps/polls/migrations/0001_initial.py +++ b/apps/polls/migrations/0001_initial.py @@ -1,55 +1,41 @@ # -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding model 'Poll' - db.create_table(u'polls_poll', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('question', self.gf('django.db.models.fields.TextField')()), - ('slug', self.gf('django.db.models.fields.SlugField')(max_length=50)), - ('open', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal(u'polls', ['Poll']) - - # Adding model 'PollItem' - db.create_table(u'polls_pollitem', ( - (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('poll', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['polls.Poll'])), - ('content', self.gf('django.db.models.fields.TextField')()), - ('vote_count', self.gf('django.db.models.fields.IntegerField')(default=0)), - )) - db.send_create_signal(u'polls', ['PollItem']) - - - def backwards(self, orm): - # Deleting model 'Poll' - db.delete_table(u'polls_poll') - - # Deleting model 'PollItem' - db.delete_table(u'polls_pollitem') - - - models = { - u'polls.poll': { - 'Meta': {'object_name': 'Poll'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'open': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'question': ('django.db.models.fields.TextField', [], {}), - 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}) - }, - u'polls.pollitem': { - 'Meta': {'object_name': 'PollItem'}, - 'content': ('django.db.models.fields.TextField', [], {}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'poll': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['polls.Poll']"}), - 'vote_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}) - } - } - - complete_apps = ['polls'] \ No newline at end of file +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Poll', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('question', models.TextField(verbose_name='question')), + ('slug', models.SlugField(verbose_name='Slug')), + ('open', models.BooleanField(default=False, verbose_name='open')), + ], + options={ + 'verbose_name': 'Poll', + 'verbose_name_plural': 'Polls', + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='PollItem', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('content', models.TextField(verbose_name='content')), + ('vote_count', models.IntegerField(default=0, verbose_name='vote count')), + ('poll', models.ForeignKey(related_name=b'items', to='polls.Poll')), + ], + options={ + 'verbose_name': 'vote item', + 'verbose_name_plural': 'vote items', + }, + bases=(models.Model,), + ), + ]