From 7197b4d1501ff6d1f826f17f9944c1c763e1d924 Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Tue, 19 Jul 2016 12:57:11 +0200 Subject: [PATCH] minor cleanup --- apps/fileupload/views.py | 1 - apps/wiki/templates/wiki/document_details_base.html | 2 +- apps/wiki/templates/wiki/document_details_readonly.html | 2 +- redakcja/context_processors.py | 2 ++ redakcja/templates/base.html | 1 + 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/fileupload/views.py b/apps/fileupload/views.py index 08aa3239..2d978727 100644 --- a/apps/fileupload/views.py +++ b/apps/fileupload/views.py @@ -43,7 +43,6 @@ class UploadViewMixin(object): """ path = os.path.abspath(os.path.join(settings.MEDIA_ROOT, self.get_directory(), filename)) - # WTF how would that be possible? if not path.startswith(os.path.abspath(settings.MEDIA_ROOT)): raise Http404 if filename: diff --git a/apps/wiki/templates/wiki/document_details_base.html b/apps/wiki/templates/wiki/document_details_base.html index e164a9ee..6e77fefa 100644 --- a/apps/wiki/templates/wiki/document_details_base.html +++ b/apps/wiki/templates/wiki/document_details_base.html @@ -1,6 +1,6 @@ {% extends "base.html" %} {% load toolbar_tags i18n %} - +{# unused #} {% block title %}{{ book.title }} - {{ block.super }}{% endblock %} {% block extrahead %} {% load compressed %} diff --git a/apps/wiki/templates/wiki/document_details_readonly.html b/apps/wiki/templates/wiki/document_details_readonly.html index 71556a19..b04f5405 100644 --- a/apps/wiki/templates/wiki/document_details_readonly.html +++ b/apps/wiki/templates/wiki/document_details_readonly.html @@ -1,6 +1,6 @@ {% extends "wiki/document_details_base.html" %} {% load i18n %} - +{# unused #} {% block editor-class %}readonly{% endblock %} {% block extrabody %} diff --git a/redakcja/context_processors.py b/redakcja/context_processors.py index feba9e9f..aae919e6 100644 --- a/redakcja/context_processors.py +++ b/redakcja/context_processors.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +import sys def settings(request): @@ -20,4 +21,5 @@ def settings(request): 'DEBUG': settings.DEBUG, 'RAVEN_CONFIG': getattr(settings, 'RAVEN_CONFIG'), 'APP_VERSION': VERSION, + 'FS_ENC': sys.getfilesystemencoding(), } diff --git a/redakcja/templates/base.html b/redakcja/templates/base.html index 3e725d45..54bd394d 100644 --- a/redakcja/templates/base.html +++ b/redakcja/templates/base.html @@ -1,6 +1,7 @@ {% load i18n %} +{# unused #} -- 2.20.1