Added extra_info field to Book model.
[wolnelektury.git] / wolnelektury / urls.py
1 # -*- coding: utf-8 -*-
2 import os
3
4 from django.conf.urls.defaults import *
5 from django.contrib import admin
6
7 admin.autodiscover()
8
9 from catalogue.forms import SearchForm
10
11 urlpatterns = patterns('',
12     url(r'^katalog/', include('catalogue.urls')),
13     
14     # Static pages
15     url(r'^wolontariat/$', 'django.views.generic.simple.direct_to_template', 
16         {'template': 'info/voluntary_services.html', 'extra_context': {'form': SearchForm()}},
17         name='voluntary_services'),
18     url(r'^mozesz-nam-pomoc/$', 'django.views.generic.simple.direct_to_template',
19         {'template': 'info/help_us.html', 'extra_context': {'form': SearchForm()}},
20         name='help_us'),
21     url(r'^o-projekcie/$', 'django.views.generic.simple.direct_to_template', 
22         {'template': 'info/about_us.html', 'extra_context': {'form': SearchForm()}},
23         name='about_us'),
24     
25     # Admin panel
26     url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
27     url(r'^admin/(.*)$', admin.site.root),
28     
29     # Authentication
30     url(r'^uzytkownicy/zaloguj/$', 'catalogue.views.login', name='login'),
31     url(r'^uzytkownicy/wyloguj/$', 'catalogue.views.logout_then_redirect', name='logout'),
32     url(r'^uzytkownicy/utworz/$', 'catalogue.views.register', name='register'),
33     
34     # Static files
35     url(r'^media/(?P<path>.*)$', 'django.views.static.serve', 
36         {'document_root': os.path.join(os.path.dirname(__file__), 'media'), 'show_indexes': True}),
37     url(r'^$', 'django.views.generic.simple.redirect_to', {'url': 'katalog/'}),
38 )