Skip to content

Commit 89fe031

Browse files
authored
Merge pull request #234 from maltalk/django2.1
Django 2.1 compatibility
2 parents 5b99075 + f50d854 commit 89fe031

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,20 @@ env:
55
- DJANGO_VERSION=https://github.com/django/django/archive/stable/1.10.x.zip
66
- DJANGO_VERSION=https://github.com/django/django/archive/stable/1.11.x.zip
77
- DJANGO_VERSION=https://github.com/django/django/archive/stable/2.0.x.zip
8+
- DJANGO_VERSION=https://github.com/django/django/archive/stable/2.1.x.zip
89
python:
910
- "2.7"
1011
- "3.4"
1112
- "3.5"
13+
- "3.6"
1214
matrix:
1315
exclude:
1416
- python: "2.7"
1517
env: DJANGO_VERSION=https://github.com/django/django/archive/stable/2.0.x.zip
18+
- python: "2.7"
19+
env: DJANGO_VERSION=https://github.com/django/django/archive/stable/2.1.x.zip
20+
- python: "3.4"
21+
env: DJANGO_VERSION=https://github.com/django/django/archive/stable/2.1.x.zip
1622
install:
1723
- pip install $DJANGO_VERSION
1824
- pip install .

forms_builder/forms/models.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from django import VERSION as DJANGO_VERSION
44
from django.contrib.sites.models import Site
5-
from django.core.exceptions import ValidationError
65

76
try:
87
from django.urls import reverse
@@ -139,9 +138,8 @@ def total_entries(self):
139138
return self.total_entries
140139
total_entries.admin_order_field = "total_entries"
141140

142-
@models.permalink
143141
def get_absolute_url(self):
144-
return ("form_detail", (), {"slug": self.slug})
142+
return reverse("form_detail", kwargs={"slug": self.slug})
145143

146144
def admin_links(self):
147145
kw = {"args": (self.id,)}

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"sphinx-me >= 0.1.2",
5151
"unidecode",
5252
"django-email-extras >= 0.2",
53-
"django >= 1.8, < 2.1",
53+
"django >= 1.8, < 2.2",
5454
"future <= 0.15.0",
5555
],
5656
classifiers = [
@@ -63,6 +63,7 @@
6363
"Programming Language :: Python :: 3",
6464
"Programming Language :: Python :: 3.4",
6565
"Programming Language :: Python :: 3.5",
66+
"Programming Language :: Python :: 3.6",
6667
"Framework :: Django",
6768
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
6869
"Topic :: Internet :: WWW/HTTP :: Site Management",

0 commit comments

Comments
 (0)