Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django 2.1 compatibility #234

Merged
merged 4 commits into from
Sep 17, 2018
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
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,20 @@ env:
- DJANGO_VERSION=https://github.com/django/django/archive/stable/1.10.x.zip
- DJANGO_VERSION=https://github.com/django/django/archive/stable/1.11.x.zip
- DJANGO_VERSION=https://github.com/django/django/archive/stable/2.0.x.zip
- DJANGO_VERSION=https://github.com/django/django/archive/stable/2.1.x.zip
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
matrix:
exclude:
- python: "2.7"
env: DJANGO_VERSION=https://github.com/django/django/archive/stable/2.0.x.zip
- python: "2.7"
env: DJANGO_VERSION=https://github.com/django/django/archive/stable/2.1.x.zip
- python: "3.4"
env: DJANGO_VERSION=https://github.com/django/django/archive/stable/2.1.x.zip
install:
- pip install $DJANGO_VERSION
- pip install .
Expand Down
4 changes: 1 addition & 3 deletions forms_builder/forms/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from django import VERSION as DJANGO_VERSION
from django.contrib.sites.models import Site
from django.core.exceptions import ValidationError

try:
from django.urls import reverse
Expand Down Expand Up @@ -139,9 +138,8 @@ def total_entries(self):
return self.total_entries
total_entries.admin_order_field = "total_entries"

@models.permalink
def get_absolute_url(self):
return ("form_detail", (), {"slug": self.slug})
return reverse("form_detail", kwargs={"slug": self.slug})

def admin_links(self):
kw = {"args": (self.id,)}
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"sphinx-me >= 0.1.2",
"unidecode",
"django-email-extras >= 0.2",
"django >= 1.8, < 2.1",
"django >= 1.8, < 2.2",
"future <= 0.15.0",
],
classifiers = [
Expand All @@ -63,6 +63,7 @@
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Framework :: Django",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Internet :: WWW/HTTP :: Site Management",
Expand Down