diff --git a/.travis.yml b/.travis.yml index dfa9356..6725cd9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,8 +40,8 @@ notifications: install: - travis_retry pip install pep8==1.7.0 - travis_retry pip install python-coveralls - - travis_retry pip install -e . - travis_retry pip install $DJANGO --upgrade + - travis_retry pip install -e . script: - coverage run --source=stream_django setup.py test after_script: diff --git a/README.md b/README.md index 928c7df..e919796 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ Below shows an example how to set things up if your user field is called author. ```python class Tweet(models.Model, Activity): created_at = models.DateTimeField(auto_now_add=True) - author = models.ForeignKey(settings.AUTH_USER_MODEL) + author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) @property def activity_actor_attr(self): diff --git a/setup.py b/setup.py index cbd017e..abf0516 100644 --- a/setup.py +++ b/setup.py @@ -6,8 +6,8 @@ README = readme.read() requirements = [ - 'django>=1.5,<2.0', - 'stream-python>=2.8.0', + 'django>=1.5,<2.1.0', + 'stream-python>=2.8.1', 'pytz' ] diff --git a/stream_django/tests/test_app/migrations/0001_initial.py b/stream_django/tests/test_app/migrations/0001_initial.py index 2865533..2569d8d 100644 --- a/stream_django/tests/test_app/migrations/0001_initial.py +++ b/stream_django/tests/test_app/migrations/0001_initial.py @@ -18,7 +18,7 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('created_at', models.DateTimeField(auto_now_add=True)), - ('author', models.ForeignKey(to=settings.AUTH_USER_MODEL)), + ('author', models.ForeignKey(to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE)), ], options={ }, diff --git a/stream_django/tests/test_app/models.py b/stream_django/tests/test_app/models.py index 22b8966..c9b981a 100644 --- a/stream_django/tests/test_app/models.py +++ b/stream_django/tests/test_app/models.py @@ -4,7 +4,7 @@ class Pin(models.Model, Activity): - author = models.ForeignKey(settings.AUTH_USER_MODEL) + author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) created_at = models.DateTimeField(auto_now_add=True) @property