kontakt/contact page accessible under katalog.* domain.
[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 )
18
19
20 # Admin stuff, if necessary.
21 if 'django.contrib.admin' in settings.INSTALLED_APPS:
22     from django.contrib import admin
23     admin.autodiscover()
24
25     if 'django_cas' in settings.INSTALLED_APPS:
26         urlpatterns += patterns('',
27             (r'^admin/logout/$', 'django_cas.views.logout'),
28         )
29     urlpatterns += patterns('',
30         url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
31         url(r'^admin/', include(admin.site.urls)),
32     )
33
34 # Auth stuff, if necessary
35 if 'django_cas' in settings.INSTALLED_APPS:
36     urlpatterns += patterns('',
37         url(r'^accounts/login/$', 'django_cas.views.login', name='login'),
38         url(r'^accounts/logout/$', 'django_cas.views.logout', name='logout'),
39     )
40
41
42 if settings.DEBUG:
43     urlpatterns += patterns('',
44         url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
45             'document_root': settings.MEDIA_ROOT,
46         }),
47    )