remove edumed clutter
[edumed.git] / edumed / urls.py
1 # -*- coding: utf-8 -*-
2 from django.conf.urls import include, url
3 from django.conf import settings
4 from django.contrib.flatpages.views import flatpage
5
6 urlpatterns = [
7     url(r'^szukaj/', include('haystack.urls')),
8
9     url(r'^zglos/', include('contact.urls')),
10     url(r'^zadania/', include('wtem.urls')),
11     url(r'^drugi-etap/', include('stage2.urls')),
12 ]
13
14
15 # Admin stuff, if necessary.
16 if 'django.contrib.admin' in settings.INSTALLED_APPS:
17     from django.contrib import admin
18     admin.autodiscover()
19
20     if 'django_cas' in settings.INSTALLED_APPS:
21         urlpatterns += [
22             url(r'^admin/logout/$', 'django_cas.views.logout'),
23         ]
24     urlpatterns += [
25         url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
26         url(r'^admin/', include(admin.site.urls)),
27     ]
28
29 # Auth stuff, if necessary
30 if 'django_cas' in settings.INSTALLED_APPS:
31     urlpatterns += [
32         url(r'^accounts/login/$', 'django_cas.views.login', name='login'),
33         url(r'^accounts/logout/$', 'django_cas.views.logout', name='logout'),
34     ]
35 else:
36     from django.contrib.auth.views import login, logout
37     urlpatterns += [
38         url(r'^accounts/login/$', login, name='login'),
39         url(r'^accounts/logout/$', logout, name='logout'),
40     ]
41
42 urlpatterns += (
43     url(r'^(?P<url>[^/]*/|)$',
44         lambda request, url: flatpage(request, 'turniej/' + url)),
45 )