diff --git a/.gitignore b/.gitignore index 740bb18..f91301d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,63 @@ +# Created by .ignore support plugin (hsz.mobi) +### Python template +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class -.vagrant +# C extensions +*.so +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +.idea/ +.vagrant/ diff --git a/testsite/items/migrations/0002_auto_20160402_1520.py b/testsite/items/migrations/0002_auto_20160402_1520.py new file mode 100644 index 0000000..4f6fd1e --- /dev/null +++ b/testsite/items/migrations/0002_auto_20160402_1520.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('stream', '0001_initial'), + ('items', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='photoitem', + name='stream', + field=models.ForeignKey(to='stream.Stream', null=True), + preserve_default=True, + ), + migrations.AddField( + model_name='tweetitem', + name='stream', + field=models.ForeignKey(to='stream.Stream', null=True), + preserve_default=True, + ), + ] diff --git a/testsite/items/models.py b/testsite/items/models.py index 7d7ebe0..8116988 100644 --- a/testsite/items/models.py +++ b/testsite/items/models.py @@ -1,10 +1,13 @@ from django.db import models from django.contrib.auth.models import User +from stream.models import Stream + class ItemAbstract(models.Model): user = models.ForeignKey(User) created_at = models.DateTimeField() + stream = models.ForeignKey(Stream, null=True) class Meta: abstract = True