use iteritems from six, or items in templates