1 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
4 from django.conf.urls import include, url
5 from django.conf import settings
6 from django.contrib import admin
7 from django.views.generic import RedirectView
8 import django.views.static
9 from machina.app import board
10 import catalogue.views
16 url(r'^$', views.main_page, name='main_page'),
17 url(r'^planowane/$', views.publish_plan, name='publish_plan'),
18 url(r'^widget\.html$', views.widget, name='widget'),
20 url(r'^zegar/$', views.clock, name='clock'),
23 url(r'^uzytkownik/$', views.user_settings, name='user_settings'),
24 url(r'^uzytkownik/login/$', views.LoginFormView(), name='login'),
25 url(r'^uzytkownik/signup/$', views.RegisterFormView(), name='register'),
26 url(r'^uzytkownik/logout/$', views.logout_then_redirect, name='logout'),
27 url(r'^uzytkownik/zaloguj-utworz/$', views.LoginRegisterFormView(), name='login_register'),
28 url(r'^uzytkownik/social/signup/$', views.SocialSignupView.as_view(), name='socialaccount_signup'),
31 url(r'^latests_blog_posts.html$', views.latest_blog_posts, name='latest_blog_posts'),
35 url(r'^katalog/', include('catalogue.urls')),
36 url(r'^opds/', include('opds.urls')),
37 url(r'^sugestia/', include('suggest.urls')),
38 url(r'^lesmianator/', include('lesmianator.urls')),
39 url(r'^przypisy/', include('dictionary.urls')),
40 url(r'^raporty/', include('reporting.urls')),
41 url(r'^info/', include('infopages.urls')),
42 url(r'^ludzie/', include('social.urls')),
43 url(r'^uzytkownik/', include('allauth.urls')),
44 url(r'^czekaj/', include('waiter.urls')),
45 url(r'^wesprzyj/', include('funding.urls')),
46 url(r'^ankieta/', include('polls.urls')),
47 url(r'^biblioteki/', include('libraries.urls')),
48 url(r'^chunks/', include('chunks.urls')),
49 url(r'^sponsors/', include('sponsors.urls')),
50 url(r'^newsletter/', include('newsletter.urls')),
51 url(r'^formularz/', include('contact.urls')),
52 url(r'^isbn/', include('isbn.urls')),
54 url(r'^paypal/app-form/$', RedirectView.as_view(
55 url='/towarzystwo/?app=1', permanent=False)),
56 url(r'^towarzystwo/dolacz/$', RedirectView.as_view(
57 url='/towarzystwo/', permanent=False)),
60 url(r'^paypal/', include('paypal.urls')),
61 url(r'^powiadomienie/', include('push.urls')),
62 url(r'^towarzystwo/', include('club.urls')),
65 url(r'^admin/catalogue/book/import$', catalogue.views.import_book, name='import_book'),
66 url(r'^admin/catalogue/picture/import$', picture.views.import_picture, name='import_picture'),
67 url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
68 url(r'^admin/', include(admin.site.urls)),
71 url(r'^api/', include('api.urls')),
73 url(r'^oaipmh/', include('oai.urls')),
75 url(r'^szukaj/', include('search.urls')),
77 url(r'^i18n/', include('django.conf.urls.i18n')),
78 url(r'^forum/', include(board.urls)),
82 # old static pages - redirected
83 url(r'^1procent/$', RedirectView.as_view(
84 url='http://nowoczesnapolska.org.pl/wesprzyj_nas/', permanent=True)),
85 url(r'^epub/$', RedirectView.as_view(
86 url='/katalog/lektury/', permanent=False)),
87 url(r'^mozesz-nam-pomoc/$', RedirectView.as_view(
88 url='/info/wlacz-sie-w-prace/', permanent=True)),
89 url(r'^o-projekcie/$', RedirectView.as_view(
90 url='/info/o-projekcie/', permanent=True)),
91 url(r'^widget/$', RedirectView.as_view(
92 url='/info/widget/', permanent=True)),
93 url(r'^wolontariat/$', RedirectView.as_view(
94 url='/info/wlacz-sie-w-prace/', permanent=False)),
98 url(r'^error-test/$', views.exception_test),
99 # url(r'^post-test/$', views.post_test),
106 url(r'^__debug__/', include(debug_toolbar.urls)),
112 url(r'^%s(?P<path>.*)$' % settings.MEDIA_URL[1:], django.views.static.serve,
113 {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
114 url(r'^%s(?P<path>.*)$' % settings.STATIC_URL[1:], django.views.static.serve,
115 {'document_root': settings.STATIC_ROOT, 'show_indexes': True}),