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
7 url(r'^szukaj/', include('haystack.urls')),
9 url(r'^zglos/', include('contact.urls')),
10 url(r'^zadania/', include('wtem.urls')),
11 url(r'^drugi-etap/', include('stage2.urls')),
15 # Admin stuff, if necessary.
16 if 'django.contrib.admin' in settings.INSTALLED_APPS:
17 from django.contrib import admin
20 if 'django_cas' in settings.INSTALLED_APPS:
22 url(r'^admin/logout/$', 'django_cas.views.logout'),
25 url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
26 url(r'^admin/', include(admin.site.urls)),
29 # Auth stuff, if necessary
30 if 'django_cas' in settings.INSTALLED_APPS:
32 url(r'^accounts/login/$', 'django_cas.views.login', name='login'),
33 url(r'^accounts/logout/$', 'django_cas.views.logout', name='logout'),
36 from django.contrib.auth.views import login, logout
38 url(r'^accounts/login/$', login, name='login'),
39 url(r'^accounts/logout/$', logout, name='logout'),
43 url(r'^(?P<url>[^/]*/|)$',
44 lambda request, url: flatpage(request, 'turniej/' + url)),
49 url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),