build pdf
[edumed.git] / edumed / urls.py
1 from django.conf.urls import patterns, include, url
2 from django.conf import settings
3 from .views import HomeView
4
5
6 urlpatterns = patterns('',
7     url(r'^$', HomeView.as_view(), name="home"),
8     url(r'^kompetencje/', include('curriculum.urls')),
9     url(r'^lekcje/', include('catalogue.urls')),
10 #    url(r'^i/', include('django.contrib.flatpages.urls')),
11     url(r'^info/(?P<url>.*)$', 'django.contrib.flatpages.views.flatpage',
12         name="info"),
13     url(r'^szukaj/', include('haystack.urls')),
14 )
15
16
17 # Admin stuff, if necessary.
18 if 'django.contrib.admin' in settings.INSTALLED_APPS:
19     from django.contrib import admin
20     admin.autodiscover()
21
22     urlpatterns += patterns('',
23         url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
24         url(r'^admin/', include(admin.site.urls)),
25     )
26
27 # Auth stuff, if necessary
28 if 'django_cas' in settings.INSTALLED_APPS:
29     urlpatterns += patterns('',
30         (r'^accounts/login/$', 'django_cas.views.login'),
31         (r'^accounts/logout/$', 'django_cas.views.logout'),
32     )
33
34
35 if settings.DEBUG:
36     urlpatterns += patterns('',
37         url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
38             'document_root': settings.MEDIA_ROOT,
39         }),
40    )