fix: dict.keys()  return list in Python 2 and iterators in Python 3.
https://docs.djangoproject.com/en/dev/topics/python3/#dict-and-dict-like-classes