Update metadata_display plugin for Python 3.
Switching from iteritems() to items() is technically less memory efficient on Python 2, but this appeared be a significantly cleaner approach than adding six to the template context. It's also the right choice assuming the project will at some point go Python 3 only.
This commit is contained in:
parent
8096beab5c
commit
25bc7ea7f6
@ -23,7 +23,7 @@
|
||||
{#- NOTE: In some smart future where the context is more extensible,
|
||||
we will need to add to the prefix here-#}
|
||||
<table class="metadata_info">
|
||||
{%- for key, value in metadata.iteritems() if not key=='@context' %}
|
||||
{%- for key, value in metadata.items() if key != '@context' %}
|
||||
{% if value -%}
|
||||
<tr>
|
||||
<th>{{ rdfa_to_readable(key) }}</th>
|
||||
|
Loading…
x
Reference in New Issue
Block a user