Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ env:
- DJANGO_VERSION="1.9"
- DJANGO_VERSION="1.10"
- DJANGO_VERSION="1.11"
- DJANGO_VERSION="2.0"

install:
- pip install -r devrequirements_${DJANGO_VERSION}.txt
Expand All @@ -33,6 +34,8 @@ matrix:
env: DJANGO_VERSION="1.10"
- python: "3.3"
env: DJANGO_VERSION="1.11"
- python: "3.3"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fengsi we don't, this is an exclude list ;)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fengsi If you look on line 26. Python 3.3 is added as part of the exclusion for Django 2.0

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my bad 👍

env: DJANGO_VERSION="2.0"
- python: "3.6"
env: DJANGO_VERSION="1.4"
- python: "3.6"
Expand All @@ -41,6 +44,8 @@ matrix:
env: DJANGO_VERSION="1.6"
- python: "3.6"
env: DJANGO_VERSION="1.7"
- python: "2.7"
env: DJANGO_VERSION="2.0"

before_deploy:
- pip install wheel
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ python runtests.py
### Requirements

* Python 2 or 3 (tested on 2.7, 3.3, 3.4, 3.6)
* Django 1.4+ (tested on 1.5, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11)
* Django 1.4+ (tested on 1.5, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11, 2.0)

### Installing & Configuring

Expand Down Expand Up @@ -96,7 +96,7 @@ class Book(models.Model):
# which is specific to users. If you want a Hook to
# be triggered for all users, add '+' to built-in Hooks
# or pass user_override=False for custom_hook events
user = models.ForeignKey('auth.User')
user = models.ForeignKey('auth.User', on_delete=models.CASCADE)
# maybe user is off a related object, so try...
# user = property(lambda self: self.intermediary.user)

Expand Down
3 changes: 3 additions & 0 deletions devrequirements_2.0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-r devrequirements.txt
django-contrib-comments>=1.8.0
Django>=2.0,<2.1
3 changes: 2 additions & 1 deletion rest_hooks/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

import django.db.models.deletion
from django.db import models, migrations
from django.conf import settings

Expand All @@ -20,7 +21,7 @@ class Migration(migrations.Migration):
('updated', models.DateTimeField(auto_now=True)),
('event', models.CharField(max_length=64, verbose_name='Event', db_index=True)),
('target', models.URLField(max_length=255, verbose_name='Target URL')),
('user', models.ForeignKey(related_name='hooks', to=settings.AUTH_USER_MODEL)),
('user', models.ForeignKey(related_name='hooks', to=settings.AUTH_USER_MODEL, on_delete=django.db.models.deletion.CASCADE)),
],
options={
},
Expand Down
2 changes: 1 addition & 1 deletion rest_hooks/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class AbstractHook(models.Model):
created = models.DateTimeField(auto_now_add=True)
updated = models.DateTimeField(auto_now=True)

user = models.ForeignKey(AUTH_USER_MODEL, related_name='%(class)ss')
user = models.ForeignKey(AUTH_USER_MODEL, related_name='%(class)ss', on_delete=models.CASCADE)
event = models.CharField('Event', max_length=64, db_index=True)
target = models.URLField('Target URL', max_length=255)

Expand Down