Further changes in i18n.
[wolnelektury.git] / wolnelektury / urls.py
1 # -*- coding: utf-8 -*-
2 import os
3
4 from django.conf.urls.defaults import *
5 from django.conf import settings
6 from django.contrib import admin
7
8 from catalogue.forms import SearchForm
9
10
11 admin.autodiscover()
12
13
14 urlpatterns = patterns('',
15     url(r'^katalog/', include('catalogue.urls')),
16     url(r'^materialy/', include('lessons.urls')),
17     
18     # Static pages
19     url(r'^wolontariat/$', 'django.views.generic.simple.direct_to_template', 
20         {'template': 'info/voluntary_services.html', 'extra_context': {'form': SearchForm()}},
21         name='voluntary_services'),
22     url(r'^mozesz-nam-pomoc/$', 'django.views.generic.simple.direct_to_template',
23         {'template': 'info/help_us.html', 'extra_context': {'form': SearchForm()}},
24         name='help_us'),
25     url(r'^o-projekcie/$', 'django.views.generic.simple.direct_to_template', 
26         {'template': 'info/about_us.html', 'extra_context': {'form': SearchForm()}},
27         name='about_us'),
28     url(r'^1procent/$', 'django.views.generic.simple.direct_to_template', {
29         'template': '1percent.html'
30     }, name='1percent'),
31     
32     # Admin panel
33     url(r'^admin/catalogue/book/import$', 'catalogue.views.import_book', name='import_book'),
34     url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
35     url(r'^admin/(.*)$', admin.site.root),
36     
37     # Authentication
38     url(r'^uzytkownicy/zaloguj/$', 'catalogue.views.login', name='login'),
39     url(r'^uzytkownicy/wyloguj/$', 'catalogue.views.logout_then_redirect', name='logout'),
40     url(r'^uzytkownicy/utworz/$', 'catalogue.views.register', name='register'),
41     
42     # API
43     (r'^api/', include('api.urls')),
44     
45     # Static files
46     url(r'^%s(?P<path>.*)$' % settings.MEDIA_URL[1:], 'django.views.static.serve', 
47         {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
48     url(r'^%s(?P<path>.*)$' % settings.STATIC_URL[1:], 'django.views.static.serve',
49         {'document_root': settings.STATIC_ROOT, 'show_indexes': True}),
50     url(r'^$', 'django.views.generic.simple.redirect_to', {'url': 'katalog/'}),
51 )