From: Jan Szejko Date: Thu, 23 Jun 2016 16:15:18 +0000 (+0200) Subject: fix unicode problems in gallery view X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/2093e5fc5be1b99b69dde50077134072d5de4de0 fix unicode problems in gallery view --- diff --git a/apps/fileupload/views.py b/apps/fileupload/views.py index fc4af0cd..89cc480f 100644 --- a/apps/fileupload/views.py +++ b/apps/fileupload/views.py @@ -6,6 +6,7 @@ from urllib import quote from django.conf import settings from django.http import HttpResponse, Http404 from django.utils.decorators import method_decorator +from django.utils.encoding import force_unicode from django.views.decorators.vary import vary_on_headers from django.views.generic import FormView, RedirectView from .forms import UploadForm @@ -48,7 +49,7 @@ class UploadViewMixin(object): if filename: if not path.startswith(self.get_safe_path()): raise Http404 - return path + return force_unicode(path) class UploadView(UploadViewMixin, FormView):