alpha
Login
or
Join now
shuuji3.xyz
/
django-tutorial
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
[READ-ONLY] Mirror of https://github.com/shuuji3/django-tutorial.
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
create a initial migration file
author
TAKAHASHI Shuuji
date
9 years ago
(Apr 6, 2017, 11:47 AM +0900)
commit
2ec62f29
2ec62f29188a7dbfeb0aa1b0b3f94608380cbcd1
parent
a03784b7
a03784b7242a27117827f705c70ee2c0d43dae42
+38
1 changed file
Expand all
Collapse all
Unified
Split
mysite
polls
migrations
0001_initial.py
+38
mysite/polls/migrations/0001_initial.py
View file
Reviewed
···
1
1
+
# -*- coding: utf-8 -*-
2
2
+
# Generated by Django 1.10.6 on 2017-04-03 06:57
3
3
+
from __future__ import unicode_literals
4
4
+
5
5
+
from django.db import migrations, models
6
6
+
import django.db.models.deletion
7
7
+
8
8
+
9
9
+
class Migration(migrations.Migration):
10
10
+
11
11
+
initial = True
12
12
+
13
13
+
dependencies = [
14
14
+
]
15
15
+
16
16
+
operations = [
17
17
+
migrations.CreateModel(
18
18
+
name='Choice',
19
19
+
fields=[
20
20
+
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
21
21
+
('choice_text', models.CharField(max_length=200)),
22
22
+
('votes', models.IntegerField(default=0)),
23
23
+
],
24
24
+
),
25
25
+
migrations.CreateModel(
26
26
+
name='Question',
27
27
+
fields=[
28
28
+
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
29
29
+
('question_text', models.CharField(max_length=200)),
30
30
+
('pub_date', models.DateTimeField(verbose_name='date published')),
31
31
+
],
32
32
+
),
33
33
+
migrations.AddField(
34
34
+
model_name='choice',
35
35
+
name='question',
36
36
+
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='polls.Question'),
37
37
+
),
38
38
+
]