fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f94edd9
)
fix unicode problems in gallery view
author
Jan Szejko
<jan.szejko@gmail.com>
Thu, 23 Jun 2016 16:15:18 +0000
(18:15 +0200)
committer
Jan Szejko
<jan.szejko@gmail.com>
Thu, 23 Jun 2016 16:15:18 +0000
(18:15 +0200)
apps/fileupload/views.py
patch
|
blob
|
history
diff --git
a/apps/fileupload/views.py
b/apps/fileupload/views.py
index
fc4af0c
..
89cc480
100644
(file)
--- 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.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
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
if filename:
if not path.startswith(self.get_safe_path()):
raise Http404
- return
path
+ return
force_unicode(path)
class UploadView(UploadViewMixin, FormView):
class UploadView(UploadViewMixin, FormView):