f55af4d82e6fd694c8420d252420e956320a0d0f
[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     url(r'^zglos/', include('contact.urls')),
15     url(r'^forum/', include('pybb.urls', namespace='pybb')),
16 )
17
18
19 # Admin stuff, if necessary.
20 if 'django.contrib.admin' in settings.INSTALLED_APPS:
21     from django.contrib import admin
22     admin.autodiscover()
23
24     urlpatterns += patterns('',
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 += patterns('',
32         (r'^accounts/login/$', 'django_cas.views.login'),
33         (r'^accounts/logout/$', 'django_cas.views.logout'),
34     )
35
36
37 if settings.DEBUG:
38     urlpatterns += patterns('',
39         url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
40             'document_root': settings.MEDIA_ROOT,
41         }),
42    )