X-Git-Url: https://git.mdrn.pl/django-cas-provider.git/blobdiff_plain/f3c49c09dc7b2a7ccee36b897b9056a9622e0c02..413bf45b20e253acdf45c0e43d4f05b1ecf33c0d:/cas_provider_examples/simple/urls.py diff --git a/cas_provider_examples/simple/urls.py b/cas_provider_examples/simple/urls.py index f1b5378..62e735d 100644 --- a/cas_provider_examples/simple/urls.py +++ b/cas_provider_examples/simple/urls.py @@ -3,9 +3,13 @@ from __future__ import unicode_literals from django.conf.urls import include, url from django.contrib import admin from django.views.generic import TemplateView +from django import VERSION + +if VERSION >= (2,): + from django.urls import path urlpatterns = [ - url(r'^admin/', include(admin.site.urls)), + url(r'^admin/', include(admin.site.urls)) if VERSION < (2,) else path('admin/', admin.site.urls), url(r'^', include('cas_provider.urls')), url(r'^accounts/profile', TemplateView.as_view(template_name='login-success-redirect-target.html')), ]