[READ-ONLY] Mirror of https://github.com/shuuji3/django-tutorial.
0

Configure Feed

Select the types of activity you want to include in your feed.

create a initial migration file

+38
+38
mysite/polls/migrations/0001_initial.py
··· 1 + # -*- coding: utf-8 -*- 2 + # Generated by Django 1.10.6 on 2017-04-03 06:57 3 + from __future__ import unicode_literals 4 + 5 + from django.db import migrations, models 6 + import django.db.models.deletion 7 + 8 + 9 + class Migration(migrations.Migration): 10 + 11 + initial = True 12 + 13 + dependencies = [ 14 + ] 15 + 16 + operations = [ 17 + migrations.CreateModel( 18 + name='Choice', 19 + fields=[ 20 + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 21 + ('choice_text', models.CharField(max_length=200)), 22 + ('votes', models.IntegerField(default=0)), 23 + ], 24 + ), 25 + migrations.CreateModel( 26 + name='Question', 27 + fields=[ 28 + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 29 + ('question_text', models.CharField(max_length=200)), 30 + ('pub_date', models.DateTimeField(verbose_name='date published')), 31 + ], 32 + ), 33 + migrations.AddField( 34 + model_name='choice', 35 + name='question', 36 + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='polls.Question'), 37 + ), 38 + ]