Fixed RemovedInDjango20Warning for django.core.urlresolvers
That fixes warning: RemovedInDjango20Warning: Importing from django.core.urlresolvers is deprecated in favor of django.urls.
That also mean this code will continue to work on Django 2.0
# -*- coding: utf-8 -*-
import re
+try:
+ from django.urls import reverse, NoReverseMatch
+except ImportError:
+ # Django < 1.10
from django.core.urlresolvers import reverse, NoReverseMatch
+
from django.utils.safestring import mark_safe
from crispy_forms.compatibility import string_types
