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

import NoReverseMatch, reverse in django2 #24

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Ivan Ven Osdel <[email protected]>
James Turk <[email protected]>
Jannis Leidel <[email protected]>
Jeremy Carbaugh
Kyrylo Havrylenko <[email protected]>
Mike Korobov <[email protected]>
Mikhael Korneev
Neil Muller
Expand Down
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CHANGES
master (unreleased)
-------------------

* none yet
* Add compatibility with Django == 2.0.

3.0.0 (2016.09.04)
------------------
Expand Down
6 changes: 5 additions & 1 deletion markitup/templatetags/markitup_tags.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
from __future__ import unicode_literals

from django import template
from django.core.urlresolvers import reverse, NoReverseMatch
from markitup import settings
from markitup.util import absolute_url
from markitup.fields import render_func

try:
from django.core.urlresolvers import NoReverseMatch, reverse
except ImportError:
from django.urls import NoReverseMatch, reverse

register = template.Library()


Expand Down
5 changes: 4 additions & 1 deletion markitup/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
import posixpath
from django import forms
from django.contrib.admin.widgets import AdminTextareaWidget
from django.core.urlresolvers import NoReverseMatch, reverse
from django.template.loader import render_to_string
from django.utils.safestring import mark_safe
from markitup import settings
from markitup.util import absolute_url

try:
from django.core.urlresolvers import NoReverseMatch, reverse
except ImportError:
from django.urls import NoReverseMatch, reverse

class MarkupInput(forms.Widget):
def render(self, name, value, attrs=None):
Expand Down
4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
envlist=
py27-1.{8,9,10},
py34-1.{8,9,10},
py35-1.{9,10}
py35-1.{9,10,11},
py35-2.{0}

[testenv]
basepython =
Expand All @@ -14,3 +15,4 @@ deps =
1.8: Django>=1.8,<1.9
1.9: Django>=1.9,<1.10
1.10: Django>=1.10,<1.11
2.0: Django==2.0