From 25bc7ea7f69597f14e39531ba6d6e2518af58d0a Mon Sep 17 00:00:00 2001 From: Ben Sturmfels Date: Wed, 18 Sep 2019 15:30:32 +1000 Subject: [PATCH] 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. --- .../mediagoblin/plugins/metadata_display/metadata_table.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediagoblin/plugins/metadata_display/templates/mediagoblin/plugins/metadata_display/metadata_table.html b/mediagoblin/plugins/metadata_display/templates/mediagoblin/plugins/metadata_display/metadata_table.html index 15ea1536..6fc46212 100644 --- a/mediagoblin/plugins/metadata_display/templates/mediagoblin/plugins/metadata_display/metadata_table.html +++ b/mediagoblin/plugins/metadata_display/templates/mediagoblin/plugins/metadata_display/metadata_table.html @@ -23,7 +23,7 @@ {#- NOTE: In some smart future where the context is more extensible, we will need to add to the prefix here-#} - {%- for key, value in metadata.iteritems() if not key=='@context' %} + {%- for key, value in metadata.items() if key != '@context' %} {% if value -%} -- 2.25.1
{{ rdfa_to_readable(key) }}