- url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
- {'document_root': os.path.join(os.path.dirname(__file__), 'media'), 'show_indexes': True}),
- url(r'^$', 'django.views.generic.simple.redirect_to', {'url': 'katalog/'}),
+ url(r'^%s(?P<path>.*)$' % settings.MEDIA_URL[1:], 'django.views.static.serve',
+ {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
+ url(r'^%s(?P<path>.*)$' % settings.STATIC_URL[1:], 'django.views.static.serve',
+ {'document_root': settings.STATIC_ROOT, 'show_indexes': True}),
+ url(r'^i18n/', include('django.conf.urls.i18n')),
+)
+
+urlpatterns += patterns('',
+ # old static pages - redirected
+ url(r'^1procent/$', RedirectView.as_view(
+ url='http://nowoczesnapolska.org.pl/wesprzyj_nas/')),
+ url(r'^epub/$', RedirectView.as_view(
+ url='/katalog/lektury/')),
+ url(r'^mozesz-nam-pomoc/$', RedirectView.as_view(
+ url='/info/mozesz-nam-pomoc')),
+ url(r'^o-projekcie/$', RedirectView.as_view(
+ url='/info/o-projekcie')),
+ url(r'^widget/$', RedirectView.as_view(
+ url='/info/widget')),
+ url(r'^wolontariat/$', RedirectView.as_view(
+ url='/info/mozesz-nam-pomoc/')),