Use secure transport for requirements.
[wolnelektury.git] / wolnelektury / urls.py
1 # -*- coding: utf-8 -*-
2 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
3 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
4 #
5 from django.conf.urls import include, patterns, url
6 from django.conf import settings
7 from django.contrib import admin
8 from django.views.generic import RedirectView
9 import wolnelektury_core.views
10
11
12 urlpatterns = patterns('wolnelektury_core.views',
13     url(r'^$', 'main_page', name='main_page'),
14     url(r'^planowane/$', 'publish_plan', name='publish_plan'),
15
16     url(r'^zegar/$', 'clock', name='clock'),
17
18     # Authentication
19     url(r'^uzytkownik/$', 'user_settings', name='user_settings'),
20     url(r'^uzytkownik/login/$', wolnelektury_core.views.LoginFormView(), name='login'),
21     url(r'^uzytkownik/signup/$', wolnelektury_core.views.RegisterFormView(), name='register'),
22     url(r'^uzytkownik/logout/$', 'logout_then_redirect', name='logout'),
23     url(r'^uzytkownik/zaloguj-utworz/$', wolnelektury_core.views.LoginRegisterFormView(), name='login_register'),
24
25     # Includes.
26     url(r'^latests_blog_posts.html$',
27         wolnelektury_core.views.latest_blog_posts,
28         name='latest_blog_posts'),
29 )
30
31 urlpatterns += patterns('',
32     url(r'^katalog/', include('catalogue.urls')),
33     url(r'^opds/', include('opds.urls')),
34     url(r'^sugestia/', include('suggest.urls')),
35     url(r'^lesmianator/', include('lesmianator.urls')),
36     url(r'^przypisy/', include('dictionary.urls')),
37     url(r'^raporty/', include('reporting.urls')),
38     url(r'^info/', include('infopages.urls')),
39     url(r'^ludzie/', include('social.urls')),
40     url(r'^uzytkownik/', include('allauth.urls')),
41     url(r'^czekaj/', include('waiter.urls')),
42     url(r'^wesprzyj/', include('funding.urls')),
43     url(r'^ankieta/', include('polls.urls')),
44     url(r'^biblioteki/', include('libraries.urls')),
45     url(r'^chunks/', include('chunks.urls')),
46     url(r'^sponsors/', include('sponsors.urls')),
47
48     # Admin panel
49     url(r'^admin/catalogue/book/import$', 'catalogue.views.import_book', name='import_book'),
50     url(r'^admin/catalogue/picture/import$', 'picture.views.import_picture', name='import_picture'),
51     url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
52     url(r'^admin/', include(admin.site.urls)),
53
54     # API
55     (r'^api/', include('api.urls')),
56     # OAIPMH
57     (r'^oaipmh/', include('oai.urls')),
58
59     url(r'^szukaj/', include('search.urls')),
60
61     # Static files
62     url(r'^%s(?P<path>.*)$' % settings.MEDIA_URL[1:], 'django.views.static.serve',
63         {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
64     url(r'^%s(?P<path>.*)$' % settings.STATIC_URL[1:], 'django.views.static.serve',
65         {'document_root': settings.STATIC_ROOT, 'show_indexes': True}),
66     url(r'^i18n/', include('django.conf.urls.i18n')),
67 )
68
69 urlpatterns += patterns('',
70     # old static pages - redirected
71     url(r'^1procent/$', RedirectView.as_view(
72         url='http://nowoczesnapolska.org.pl/wesprzyj_nas/')),
73     url(r'^epub/$', RedirectView.as_view(
74         url='/katalog/lektury/')),
75     url(r'^mozesz-nam-pomoc/$', RedirectView.as_view(
76         url='/info/mozesz-nam-pomoc')),
77     url(r'^o-projekcie/$', RedirectView.as_view(
78         url='/info/o-projekcie')),
79     url(r'^widget/$', RedirectView.as_view(
80         url='/info/widget')),
81     url(r'^wolontariat/$', RedirectView.as_view(
82         url='/info/mozesz-nam-pomoc/')),
83 )