Django 1.10: Do not use patterns function.

This commit is contained in:
Umair Khan 2016-10-27 15:38:16 +05:00 committed by Tim Abbott
parent d81446805c
commit b140236fcf
4 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
from django.conf.urls import patterns, url
from django.conf.urls import url
i18n_urlpatterns = [
url(r'^activity$', 'analytics.views.get_activity'),
@ -6,4 +6,4 @@ i18n_urlpatterns = [
url(r'^user_activity/(?P<email>[\S]+)/$', 'analytics.views.get_user_activity'),
]
urlpatterns = patterns('', *i18n_urlpatterns)
urlpatterns = i18n_urlpatterns

View File

@ -1,4 +1,4 @@
from django.conf.urls import patterns, url
from django.conf.urls import url
from django.views.generic import TemplateView, RedirectView
i18n_urlpatterns = [
@ -12,4 +12,4 @@ i18n_urlpatterns = [
url(r'^privacy/$', TemplateView.as_view(template_name='corporate/privacy.html')),
]
urlpatterns = patterns('', *i18n_urlpatterns)
urlpatterns = i18n_urlpatterns

View File

@ -1,4 +1,4 @@
from django.conf.urls import patterns, url, include
from django.conf.urls import url, include
i18n_urlpatterns = [
# SSO dispatch page for desktop app with SSO

View File

@ -1,5 +1,5 @@
from django.conf import settings
from django.conf.urls import patterns, url, include
from django.conf.urls import url, include
from django.conf.urls.i18n import i18n_patterns
from django.views.generic import TemplateView, RedirectView
from django.utils.module_loading import import_string