[gen] Added the posssibility to create a custom widget that displays an icon for generating a doc from a pod field, but with an additional param allowing to customize the pod context.

This commit is contained in:
Gaetan Delannay 2013-06-20 17:35:52 +02:00
parent e83f0f3815
commit 086f93e845
7 changed files with 16 additions and 3 deletions

View file

@ -309,7 +309,7 @@ class Renderer:
if not content and not at:
raise PodError(DOC_NOT_SPECIFIED)
# Convert Zope files into Appy wrappers.
if content.__class__.__name__ == 'File':
if content.__class__.__name__ in ('File', 'Image'):
content = FileWrapper(content)
# Guess document format
if isinstance(content, FileWrapper):