Skip to content

Commit

Permalink
fixes and testing for Django 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
PetrDlouhy committed Aug 30, 2018
1 parent f50d712 commit e09302e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ addons:
- python3.4
- python3.5
- python3.6
- python3.7

# The version of Python that'll be used to invoke tox. Has no effect
# on what version of Python tox uses to run each set of tests.
Expand All @@ -40,6 +41,9 @@ env:
- TOXENV=py35-2.0.X
- TOXENV=py36-2.0.X

- TOXENV=py35-2.1.X
- TOXENV=py36-2.1.X

- TOXENV=coverage
- TOXENV=docs
- TOXENV=qunit
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
},
"dependencies": {
"backbone": ">=1.2 <1.3",
"codemirror": ">=5.10 <6.0",
"codemirror": "^5.40.0",
"jquery": ">=2.2 <2.3",
"jshint": "^2.9.5",
"jshint": "^2.9.6",
"less": "^2.7.3",
"phantomjs-prebuilt": "^2.1.16",
"underscore": ">=1.8 <1.9"
Expand Down
12 changes: 7 additions & 5 deletions scribbler/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
from django.db import models
from django.db.models.signals import post_save, post_delete, pre_save
from django.dispatch import receiver
try:
from django.urls import reverse
except ImportError:
from django.core.urlresolvers import reverse
try:
from django.utils.six import PY3
except ImportError:
Expand Down Expand Up @@ -35,16 +39,14 @@ def __str__(self):
class Meta(object):
unique_together = ('slug', 'url')

@models.permalink
def get_save_url(self):
if self.pk:
return ('edit-scribble', (), {'scribble_id': self.pk})
return reverse('edit-scribble', kwargs={'scribble_id': self.pk})
else:
return ('create-scribble', (), {})
return reverse('create-scribble')

@models.permalink
def get_delete_url(self):
return ('delete-scribble', (), {'scribble_id': self.pk})
return reverse('delete-scribble', kwargs={'scribble_id': self.pk})


@receiver(post_save, sender=Scribble)
Expand Down
4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ envlist =
{py27,py34,py35}-1.8.X,
{py27,py34,py35}-1.10.X,
{py27,py34,py35,py36}-1.11.X,
{py34,py35,py36}-{2.0}.X,
{py34,py35,py36,py37}-{2.0}.X,
{py35,py36,py37}-{2.1}.X,
coverage,docs,qunit

[testenv]
Expand All @@ -25,6 +26,7 @@ deps =
1.10.X: Django>=1.10,<1.11
1.11.X: Django>=1.11,<2.0
2.0.X: Django>=2.0,<2.1
2.1.X: Django>=2.1,<2.2
Jinja2
selenium
whitelist_externals = make
Expand Down

0 comments on commit e09302e

Please sign in to comment.