From df74c3a1f3cefd9ad9db72d5a976bf0f04fd7492 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 8 Dec 2017 22:22:01 +0100 Subject: [PATCH] redirect images --- camp/urls.py | 1 + content/views.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/camp/urls.py b/camp/urls.py index a7e27ce..c2805c4 100644 --- a/camp/urls.py +++ b/camp/urls.py @@ -23,6 +23,7 @@ urlpatterns = [ url(r'^.*index.php$', views.redirect_index, name='redirect_index'), url(r'^.*event.php$', views.redirect_event, name='redirect_event'), + url(r'^.*(/images/.*)$', views.redirect_images, name='redirect_images'), url(r'^projects/', views.projects, name='projects'), url(r'^events/', views.events, name='events'), diff --git a/content/views.py b/content/views.py index 6150b9f..6604950 100644 --- a/content/views.py +++ b/content/views.py @@ -72,3 +72,7 @@ def redirect_event(request): return redirect(reverse('content', kwargs={'shortname': content.shortname})) return redirect(reverse('events')) + +def redirect_images(request, image): + return redirect(image) +