[py3] Fixed access to dict keys/values/items.

This commit is contained in:
Aymeric Augustin 2012-07-20 21:14:27 +02:00
parent fa3f0aa021
commit ee191715ea
64 changed files with 187 additions and 155 deletions

View file

@ -63,8 +63,7 @@ class Media(StrAndUnicode):
def render_css(self):
# To keep rendering order consistent, we can't just iterate over items().
# We need to sort the keys, and iterate over the sorted list.
media = self._css.keys()
media.sort()
media = sorted(self._css.keys())
return chain(*[
[format_html('<link href="{0}" type="text/css" media="{1}" rel="stylesheet" />', self.absolute_path(path), medium)
for path in self._css[medium]]