- 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/', permanent=True)),
+ url(r'^epub/$', RedirectView.as_view(
+ url='/katalog/lektury/', permanent=False)),
+ url(r'^mozesz-nam-pomoc/$', RedirectView.as_view(
+ url='/info/mozesz-nam-pomoc', permanent=True)),
+ url(r'^o-projekcie/$', RedirectView.as_view(
+ url='/info/o-projekcie', permanent=True)),
+ url(r'^widget/$', RedirectView.as_view(
+ url='/info/widget', permanent=True)),
+ url(r'^wolontariat/$', RedirectView.as_view(
+ url='/info/mozesz-nam-pomoc/', permanent=False)),