From 788116a06f23ae513c9aba1bd7e64d634edd4567 Mon Sep 17 00:00:00 2001 From: Oliver Falk Date: Fri, 15 Mar 2019 15:52:20 +0100 Subject: [PATCH] Redirect to deadbeef in case digest length is incorrect - addresses issue #43 --- ivatar/urls.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ivatar/urls.py b/ivatar/urls.py index a7a4870..7ba926b 100644 --- a/ivatar/urls.py +++ b/ivatar/urls.py @@ -24,11 +24,7 @@ urlpatterns = [ # pylint: disable=invalid-name url(r'avatar/$', AvatarImageView.as_view(), name='avatar_view'), url( r'avatar/(?P\w*)', - TemplateView.as_view( - template_name='error.html', - extra_context={ - 'errormessage': 'Incorrect digest length', - })), + RedirectView.as_view(url='/static/img/deadbeef.png'), name='invalid_hash'), url( r'gravatarproxy/(?P\w*)', GravatarProxyView.as_view(), name='gravatarproxy'),