- url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
- (r'^admin/', include(admin.site.urls)),
-
- (r'^comments/', include('django.contrib.comments.urls')),
+ path('admin/doc/', include('django.contrib.admindocs.urls')),
+ path('admin/', admin.site.urls),
+ path('catalogue/', include('catalogue.urls')),
+ path('', RedirectView.as_view(url='/documents/', permanent=False)),
+ path('documents/', include('documents.urls')),
+ path('apiclient/', include('apiclient.urls')),
+ path('editor/', include('wiki.urls')),
+ path('images/', include('wiki_img.urls')),
+ path('cover/', include('cover.urls')),
+ path('depot/', include('depot.urls')),
+ path('wlxml/', include('wlxml.urls')),
+
+ path('api/', include('redakcja.api.urls')),
+]
+
+
+if settings.CAS_SERVER_URL:
+ urlpatterns += [
+ 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='logout'),
+ ]
+else:
+ import django.contrib.auth.views
+ urlpatterns += [
+ path('accounts/login/', django.contrib.auth.views.LoginView.as_view(), name='cas_ng_login'),
+ path('accounts/', include('django.contrib.auth.urls')),
+ ]