fnp
/
django-cas-provider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support for Python 3.10 and Django 4.0, drop Python 3.5, Python 3.6, Django 1.9,...
[django-cas-provider.git]
/
cas_provider_examples
/
simple
/
urls.py
diff --git
a/cas_provider_examples/simple/urls.py
b/cas_provider_examples/simple/urls.py
index
1d8eafa
..
d13d505
100644
(file)
--- a/
cas_provider_examples/simple/urls.py
+++ b/
cas_provider_examples/simple/urls.py
@@
-1,10
+1,13
@@
-from django.conf.urls import
patterns,
include, url
+from django.conf.urls import include, url
from django.contrib import admin
from django.views.generic import TemplateView
from django.contrib import admin
from django.views.generic import TemplateView
+from django import VERSION
-urlpatterns = patterns('',
- url(r'^admin/', include(admin.site.urls)),
- url(r'^', include('cas_provider.urls')),
- url(r'^accounts/profile', TemplateView.as_view(template_name='login-success-redirect-target.html')),
+if VERSION >= (2,):
+ from django.urls import path
- )
+urlpatterns = [
+ 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')),
+]