Skip to content

Commit

Permalink
django 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nwolff committed Dec 7, 2017
1 parent 036f82b commit 4158f70
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 27 deletions.
24 changes: 9 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,23 @@ language: python
matrix:
include:
- python: '3.5'
env: TOXENV=py35-django111-checkmigrations
env: TOXENV=py35-django20-checkmigrations
- python: '3.5'
env: TOXENV=py35-django111-flake
env: TOXENV=py35-django20-flake
- python: '3.5'
env: TOXENV=py35-django111-coverage
- python: '3.4'
env: TOXENV=py34-django18-test
- python: '3.5'
env: TOXENV=py35-django18-test
- python: '3.6'
env: TOXENV=py36-django18-test
- python: '3.4'
env: TOXENV=py34-django110-test
- python: '3.5'
env: TOXENV=py35-django110-test
- python: '3.6'
env: TOXENV=py36-django110-test
env: TOXENV=py35-django20-coverage
- python: '3.4'
env: TOXENV=py34-django111-test
- python: '3.5'
env: TOXENV=py35-django111-test
- python: '3.6'
env: TOXENV=py36-django111-test
- python: '3.4'
env: TOXENV=py34-django20-test
- python: '3.5'
env: TOXENV=py35-django20-test
- python: '3.6'
env: TOXENV=py36-django20-test
install:
- pip install tox
script:
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Framework :: Django :: 1.8',
'Framework :: Django :: 1.10',
'Framework :: Django :: 1.11',
'Framework :: Django :: 2.0',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
Expand Down
5 changes: 3 additions & 2 deletions tests/models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import uuid

from django.db import models

from tombstones.models import SoftDeleteModel


Expand All @@ -15,10 +16,10 @@ class VicePrincipal(Person):

class Vehicle(SoftDeleteModel):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
owner = models.ForeignKey(Person, related_name='vehicles')
owner = models.ForeignKey(Person, related_name='vehicles', on_delete=models.CASCADE)
make = models.CharField(max_length=100)


class Car(SoftDeleteModel):
vehicle = models.OneToOneField(Vehicle, primary_key=True)
vehicle = models.OneToOneField(Vehicle, primary_key=True, on_delete=models.CASCADE)
license_plate = models.CharField(max_length=6)
4 changes: 2 additions & 2 deletions tests/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django.conf.urls import include, url
from django.conf.urls import url
from django.contrib import admin

urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^admin/', admin.site.urls),
]
2 changes: 1 addition & 1 deletion tombstones/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '0.1.12'
__version__ = '0.1.13'
__copyright__ = 'Copyright (c) 2017, skioo SA'
__licence__ = 'MIT'
__URL__ = 'https://github.com/skioo/django-tombstones'
2 changes: 1 addition & 1 deletion tombstones/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class Tombstone(models.Model):
created = models.DateTimeField(auto_now_add=True)
content_type = models.ForeignKey(ContentType)
content_type = models.ForeignKey(ContentType, on_delete=models.CASCADE)
object_id = models.UUIDField(db_index=True)
content_object = GenericForeignKey()

Expand Down
7 changes: 3 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
envlist =
{py34,py35,py36}-{django18,django110,django111}-test
py35-django111-{checkmigrations,flake,coverage}
{py34,py35,py36}-{django111,django20}-test
py35-django20-{checkmigrations,flake,coverage}

[testenv]
basepython =
Expand All @@ -14,9 +14,8 @@ commands =
flake: flake8
coverage: py.test tests --cov tombstones --cov-report term-missing
deps =
django18: Django>=1.8,<1.9
django110: Django>=1.10,<1.11
django111: Django>=1.11,<1.12
django20: Django>=2.0,<2.1
pytest-django
pytest-cov
flake: flake8
Expand Down

0 comments on commit 4158f70

Please sign in to comment.