some logging to resolve (bug #643482)
This commit is contained in:
Родитель
9cf878a93a
Коммит
3625d630c9
|
@ -5,6 +5,7 @@ from django.conf import settings
|
|||
from django.utils.http import http_date
|
||||
from django.views.decorators.cache import never_cache
|
||||
|
||||
import commonware.log
|
||||
import jingo
|
||||
|
||||
from access import acl
|
||||
|
@ -17,6 +18,9 @@ from files.tasks import extract_file
|
|||
from tower import ugettext as _
|
||||
|
||||
|
||||
log = commonware.log.getLogger('z.addons')
|
||||
|
||||
|
||||
def setup_viewer(request, file_obj):
|
||||
data = {'file': file_obj,
|
||||
'version': file_obj.version,
|
||||
|
@ -134,5 +138,7 @@ def files_serve(request, viewer, key):
|
|||
files = viewer.get_files()
|
||||
obj = files.get(key)
|
||||
if not obj:
|
||||
log.error(u'Couldn\'t find %s in %s (%d entries) for file %s' %
|
||||
(key, files.keys()[:10], len(files.keys()), viewer.file.id))
|
||||
raise http.Http404()
|
||||
return HttpResponseSendFile(request, obj['full'])
|
||||
|
|
Загрузка…
Ссылка в новой задаче