Skip to content

Commit

Permalink
8 - Foreign Key Basics Part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
jmitchel3 committed Jul 13, 2015
1 parent 0aa8b0f commit 3386ffc
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 0 deletions.
Binary file modified src/db.sqlite3
Binary file not shown.
Binary file modified src/questions/admin.pyc
Binary file not shown.
23 changes: 23 additions & 0 deletions src/questions/migrations/0003_auto_20150713_1933.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):

dependencies = [
('questions', '0002_answer'),
]

operations = [
migrations.RemoveField(
model_name='answer',
name='question',
),
migrations.AddField(
model_name='question',
name='answers',
field=models.ManyToManyField(to='questions.Answer'),
),
]
Binary file added src/questions/migrations/0003_auto_20150713_1933.pyc
Binary file not shown.
24 changes: 24 additions & 0 deletions src/questions/migrations/0004_auto_20150713_1937.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):

dependencies = [
('questions', '0003_auto_20150713_1933'),
]

operations = [
migrations.RemoveField(
model_name='question',
name='answers',
),
migrations.AddField(
model_name='answer',
name='question',
field=models.ForeignKey(default=1, to='questions.Question'),
preserve_default=False,
),
]
Binary file added src/questions/migrations/0004_auto_20150713_1937.pyc
Binary file not shown.
Binary file modified src/questions/models.pyc
Binary file not shown.

0 comments on commit 3386ffc

Please sign in to comment.