Show More
@@ -159,8 +159,17 b' class DisplayFormatter(Configurable):' | |||||
159 |
|
159 | |||
160 | for format_type, formatter in self.formatters.items(): |
|
160 | for format_type, formatter in self.formatters.items(): | |
161 | if format_type in format_dict: |
|
161 | if format_type in format_dict: | |
162 | # already got it from mimebundle, don't render again |
|
162 | # already got it from mimebundle, maybe don't render again. | |
163 | continue |
|
163 | # exception: manually registered per-mime renderer | |
|
164 | # check priority: | |||
|
165 | # 1. user-registered per-mime formatter | |||
|
166 | # 2. mime-bundle (user-registered or repr method) | |||
|
167 | # 3. default per-mime formatter (e.g. repr method) | |||
|
168 | try: | |||
|
169 | formatter.lookup(obj) | |||
|
170 | except KeyError: | |||
|
171 | # no special formatter, use mime-bundle-provided value | |||
|
172 | continue | |||
164 | if include and format_type not in include: |
|
173 | if include and format_type not in include: | |
165 | continue |
|
174 | continue | |
166 | if exclude and format_type in exclude: |
|
175 | if exclude and format_type in exclude: |
General Comments 0
You need to be logged in to leave comments.
Login now