Ticket #24653: 0001_initial.py

File 0001_initial.py, 1.1 KB (added by László Károlyi, 10 years ago)

initial migration

Line 
1# -*- coding: utf-8 -*-
2from __future__ import unicode_literals
3
4from django.db import models, migrations
5
6
7class Migration(migrations.Migration):
8
9 dependencies = [
10 ]
11
12 operations = [
13 migrations.CreateModel(
14 name='Choice',
15 fields=[
16 ('id', models.AutoField(primary_key=True, verbose_name='ID', auto_created=True, serialize=False)),
17 ('choice_text', models.CharField(max_length=200)),
18 ('votes', models.IntegerField(default=0)),
19 ],
20 ),
21 migrations.CreateModel(
22 name='Question',
23 fields=[
24 ('id', models.AutoField(primary_key=True, verbose_name='ID', auto_created=True, serialize=False)),
25 ('question_text', models.CharField(max_length=200)),
26 ('pub_date', models.DateTimeField(verbose_name='date published')),
27 ],
28 ),
29 migrations.AddField(
30 model_name='choice',
31 name='question',
32 field=models.ForeignKey(to='polls.Question'),
33 ),
34 ]
Back to Top