<li class="nav-item"><a class="nav-link" href='{% url "admin:archive_project_changelist" %}'>{% trans "Projects" %}</a></li>
{% endif %}
{% if user.is_authenticated %}
- <li class="nav-item"><a class="nav-link" href="{% url 'logout' %}">{% trans "Logout" %}</a></li>
+ <li class="nav-item"><a class="nav-link" href="{% url 'cas_ng_logout' %}">{% trans "Logout" %}</a></li>
{% else %}
- <li class="nav-item"><a class="nav-link" href="{% url 'login' %}">{% trans "Login" %}</a></li>
+ <li class="nav-item"><a class="nav-link" href="{% url 'cas_ng_login' %}">{% trans "Login" %}</a></li>
{% endif %}
{% if user.is_staff %}
<li class="nav-item"><a class="nav-link" href='{% url "admin:index" %}'>{% trans "Administration" %}</a></li>
-from django.conf import settings
-from django.conf.urls import include, url
+from django.contrib import admin
+from django.urls import include, path
from django.views.generic import RedirectView
+from django.contrib import admin
import django_cas_ng.views
-# Uncomment the next two lines to enable the admin:
-from django.contrib import admin
-admin.autodiscover()
urlpatterns = [
- url(r'^$', RedirectView.as_view(url='archive/', permanent=False)),
- url(r'^archive/', include('archive.urls')),
- url(r'^youtube/', include('youtube.urls')),
- url(r'^publish/', include('apiclient.urls')),
+ path('', RedirectView.as_view(url='archive/', permanent=False)),
+ path('archive/', include('archive.urls')),
+ path('youtube/', include('youtube.urls')),
+ path('publish/', include('apiclient.urls')),
- url(r'^admin/', admin.site.urls),
- url(r'^accounts/login/$', django_cas_ng.views.LoginView.as_view(), name='login'),
- url(r'^accounts/logout/$', django_cas_ng.views.LogoutView.as_view(), name='logout'),
+ path('admin/', admin.site.urls),
+ path('accounts/login/', django_cas_ng.views.LoginView.as_view(), name='cas_ng_login'),
+ path('accounts/logout/', django_cas_ng.views.LogoutView.as_view(), name='cas_ng_logout'),
]