fe21f9c6af
- Update django-allauth-cas to the last version. - Add docs (README, example/README). - Add tests for Clipper provider. - Add tests to check templates do not contain syntax error. - Add the last missing templates to override all allauth's displayable templates. - Improve stylesheets.
36 lines
1.1 KiB
Python
36 lines
1.1 KiB
Python
from django.conf.urls import url, include
|
|
from django.contrib import admin
|
|
from django.contrib.auth.decorators import login_required, permission_required
|
|
from django.views.generic import RedirectView
|
|
|
|
import debug_toolbar
|
|
from allauth_ens.views import capture_login, capture_logout
|
|
|
|
from app import views
|
|
|
|
urlpatterns = [
|
|
# Catch admin login/logout views.
|
|
url(r'^admin/login/', capture_login),
|
|
url(r'^admin/logout/', capture_logout),
|
|
|
|
# Admin urls include comes after.
|
|
url(r'^admin/', admin.site.urls),
|
|
|
|
# Base views with different required permissions.
|
|
url(r'^view/', views.HomeView.as_view(),
|
|
name='view'),
|
|
url(r'^user/', login_required()(views.HomeView.as_view()),
|
|
name='user-view'),
|
|
url(r'^root/', permission_required('foo.perm')(views.HomeView.as_view()),
|
|
name='root-view'),
|
|
|
|
# Authens urls (handle login/logout views).
|
|
url(r'^account/', include('allauth_ens.urls')),
|
|
|
|
|
|
# (Redirect from /)
|
|
url(r'^$', RedirectView.as_view(url='/view/'),
|
|
name='home'),
|
|
]
|
|
|
|
urlpatterns += [url(r'^__debug__/', include(debug_toolbar.urls))]
|