##// END OF EJS Templates
propagate display metadata to all mimetypes...
Paul Ivanov -
Show More
@@ -118,6 +118,12 b' def display(*objs, **kwargs):'
118 for obj in objs:
118 for obj in objs:
119 format_dict, md_dict = format(obj, include=include, exclude=exclude)
119 format_dict, md_dict = format(obj, include=include, exclude=exclude)
120 if metadata:
120 if metadata:
121 # publish_display_data exepects metadata dict that is keyed by
122 # mimetype, so this ensures we recreate such a dict for it, if
123 # one is not already passed to us
124 if set(metadata.keys()) != set(format_dict.keys()):
125 _md = metadata.copy()
126 metadata = {mt: _md for mt in format_dict}
121 # kwarg-specified metadata gets precedence
127 # kwarg-specified metadata gets precedence
122 _merge(md_dict, metadata)
128 _merge(md_dict, metadata)
123 publish_display_data('display', format_dict, md_dict)
129 publish_display_data('display', format_dict, md_dict)
General Comments 0
You need to be logged in to leave comments. Login now