1 # -*- coding: utf-8 -*-
4 from django.conf.urls.defaults import *
5 from django.conf import settings
6 from django.contrib import admin
12 urlpatterns = patterns('wolnelektury.views',
13 url(r'^$', 'main_page', name='main_page'),
15 url(r'^zegar/$', 'clock', name='clock'),
18 url(r'^uzytkownicy/zaloguj/$', views.LoginFormView(), name='login'),
19 url(r'^uzytkownicy/utworz/$', views.RegisterFormView(), name='register'),
20 url(r'^uzytkownicy/wyloguj/$', 'logout_then_redirect', name='logout'),
23 urlpatterns += patterns('',
24 url(r'^katalog/', include('catalogue.urls')),
25 url(r'^materialy/', include('lessons.urls')),
26 url(r'^opds/', include('opds.urls')),
27 url(r'^sugestia/', include('suggest.urls')),
28 url(r'^lesmianator/', include('lesmianator.urls')),
29 url(r'^przypisy/', include('dictionary.urls')),
30 url(r'^raporty/', include('reporting.urls')),
31 url(r'^info/', include('infopages.urls')),
34 url(r'^admin/catalogue/book/import$', 'catalogue.views.import_book', name='import_book'),
35 url(r'^admin/catalogue/picture/import$', 'picture.views.import_picture', name='import_picture'),
36 url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
37 url(r'^admin/', include(admin.site.urls)),
40 (r'^api/', include('api.urls')),
43 url(r'^%s(?P<path>.*)$' % settings.MEDIA_URL[1:], 'django.views.static.serve',
44 {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
45 url(r'^%s(?P<path>.*)$' % settings.STATIC_URL[1:], 'django.views.static.serve',
46 {'document_root': settings.STATIC_ROOT, 'show_indexes': True}),
47 url(r'^i18n/', include('django.conf.urls.i18n')),
50 urlpatterns += patterns('django.views.generic.simple',
51 # old static pages - redirected
52 url(r'^1procent/$', 'redirect_to',
53 {'url': 'http://nowoczesnapolska.org.pl/wesprzyj_nas/'}),
54 url(r'^epub/$', 'redirect_to',
55 {'url': '/katalog/lektury/'}),
56 url(r'^mozesz-nam-pomoc/$', 'redirect_to',
57 {'url': '/info/mozesz-nam-pomoc'}),
58 url(r'^o-projekcie/$', 'redirect_to',
59 {'url': '/info/o-projekcie'}),
60 url(r'^widget/$', 'redirect_to',
61 {'url': '/info/widget'}),
62 url(r'^wolontariat/$', 'redirect_to',
63 {'url': '/info/mozesz-nam-pomoc/'}),
67 if 'rosetta' in settings.INSTALLED_APPS:
68 urlpatterns += patterns('',
69 url(r'^rosetta/', include('rosetta.urls')),