Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Raise exceptions on version generation in debug

If you do not have PIL installed correctly and `version_generator` throws an exception, it is disregarded here, even in when `TEMPLATE_DEBUG` is `True`.  This makes it hard to determine why you can't select a different size version in the admin.  What is passed back to the image selection window is a blank string.  Re-raising the exception here is helpful for debugging.
  • Loading branch information...
commit 01d252b075e4a4ed201f15f89f820bea3eb96717 1 parent dc6d8c7
@obsoleter authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 filebrowser/templatetags/
4 filebrowser/templatetags/
@@ -124,7 +124,9 @@ def render(self, context):
elif >
version_path = version_generator(source, version_prefix, force=True, site=site)
context[self.var_name] = FileObject(version_path, site=site)
- except:
+ except Exception as e:
+ if settings.TEMPLATE_DEBUG:
+ raise e
context[self.var_name] = ""
return ''
Please sign in to comment.
Something went wrong with that request. Please try again.