Skip to content

Commit 4dc7508

Browse files
authored
Merge pull request justinmayer#46 from DebtExplainedLtd/master
Update import of get_callable to be Django 2.x compatible
2 parents 2237710 + d30c602 commit 4dc7508

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

autoslug/settings.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,12 @@
5858
5959
"""
6060
from django.conf import settings
61-
from django.core.urlresolvers import get_callable
61+
from django import VERSION
62+
63+
if VERSION >= (2, 0):
64+
from django.urls import get_callable
65+
else:
66+
from django.core.urlresolvers import get_callable
6267

6368
# use custom slugifying function if any
6469
slugify_function_path = getattr(settings, 'AUTOSLUG_SLUGIFY_FUNCTION', 'autoslug.utils.slugify')

0 commit comments

Comments
 (0)