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

Load reverse from the new location for Django 2.x compatibility #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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: 3 additions & 3 deletions src/shorturls/templatetags/shorturl.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from django import template
from django.conf import settings
from django.core import urlresolvers
from django.urls import reverse, NoReverseMatch
from django.utils.safestring import mark_safe
from shorturls import default_converter as converter, views

Expand Down Expand Up @@ -37,11 +37,11 @@ def render(self, context):
return urljoin(settings.SHORT_BASE_URL, prefix + tinyid)

try:
return urlresolvers.reverse(views.redirect, kwargs={
return reverse(views.redirect, kwargs={
'prefix': prefix,
'tiny': tinyid
})
except urlresolvers.NoReverseMatch:
except NoReverseMatch:
return ''

def get_prefix(self, model):
Expand Down