c77c11210527013cb5b8f1ceaccf0395eeccb4ad
[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, AvatarlessProfileEditView
4
5
6
7 urlpatterns = patterns('',
8     url(r'^$', HomeView.as_view(), name="home"),
9     url(r'^lekcje/', include('catalogue.urls')),
10     url(r'^info/(?P<url>.*)$', 'django.contrib.flatpages.views.flatpage',
11         name="info"),
12     url(r'^szukaj/', include('haystack.urls')),
13     url(r'^zglos/', include('contact.urls')),
14     url(r'^forum/profile/edit/$', AvatarlessProfileEditView.as_view(), name='edit_profile'),
15     url(r'^forum/', include('forum.urls')),
16     url(r'^forum/', include('pybb.urls', namespace='pybb')),
17     url(r'^kompetencje/', include('curriculum.urls')),
18     #url(r'^wtem/', include('wtem.urls')),
19     url(r'^tem/', include('wtem.urls')),
20 )
21
22
23 # Admin stuff, if necessary.
24 if 'django.contrib.admin' in settings.INSTALLED_APPS:
25     from django.contrib import admin
26     admin.autodiscover()
27
28     if 'django_cas' in settings.INSTALLED_APPS:
29         urlpatterns += patterns('',
30             (r'^admin/logout/$', 'django_cas.views.logout'),
31         )
32     urlpatterns += patterns('',
33         url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
34         url(r'^admin/', include(admin.site.urls)),
35     )
36
37 # Auth stuff, if necessary
38 if 'django_cas' in settings.INSTALLED_APPS:
39     urlpatterns += patterns('',
40         url(r'^accounts/login/$', 'django_cas.views.login', name='login'),
41         url(r'^accounts/logout/$', 'django_cas.views.logout', name='logout'),
42     )
43
44
45 if settings.DEBUG:
46     from fnpdjango.utils.urls import i18n_patterns
47     from .views import mil_home_view, mil_contact_view, mil_knowledge_base_view
48     urlpatterns += i18n_patterns(
49         '',
50         url(r'^katalog/$', mil_home_view, name="mil_home"),
51         url(r'^wez-udzial/', include('comment.urls')),
52         url(r'^kontakt/$', mil_contact_view, name='mil_contact'),
53         url(r'^bazawiedzy/(?P<url>.*)$', mil_knowledge_base_view, name="knowledge_base"),
54     )
55
56
57 if settings.DEBUG:
58     urlpatterns += patterns('',
59         url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
60             'document_root': settings.MEDIA_ROOT,
61         }),
62    )