Choose your day.
[prawokultury.git] / contact / views.py
index 5d4a62a..5c1343c 100644 (file)
@@ -1,8 +1,9 @@
+from urllib import unquote
 from django.contrib.auth.decorators import permission_required
 from django.http import Http404, HttpResponse
 from django.shortcuts import get_object_or_404, redirect, render
 from django.utils.translation import ugettext_lazy as _
-from prawokultury.helpers import serve_file
+from fnpdjango.utils.views import serve_file
 from .forms import contact_forms
 from .models import Attachment
 
@@ -37,4 +38,4 @@ def thanks(request, form_tag):
 @permission_required('contact.change_attachment')
 def attachment(request, contact_id, tag):
     attachment = get_object_or_404(Attachment, contact_id=contact_id, tag=tag)
-    return serve_file(attachment.file.url)
+    return serve_file(unquote(attachment.file.url))