changed dict.iteritems() call to dict.items() for python 3 compatibility...

fix_request_path_info
hottwaj 2014-02-19 11:05:57 +00:00
parent 578aa8f1dd
commit 02221d7d10
1 changed files with 1 additions and 1 deletions

View File

@ -183,7 +183,7 @@ class PolymorphicModel(six.with_metaclass(PolymorphicModelBase, models.Model)):
add_model(model, field_name, result) add_model(model, field_name, result)
def add_all_super_models(model, result): def add_all_super_models(model, result):
for super_cls, field_to_super in model._meta.parents.iteritems(): for super_cls, field_to_super in model._meta.parents.items():
if field_to_super is not None: #if not a link to a proxy model if field_to_super is not None: #if not a link to a proxy model
field_name = field_to_super.name #the field on model can have a different name to super_cls._meta.module_name, if the field is created manually using 'parent_link' field_name = field_to_super.name #the field on model can have a different name to super_cls._meta.module_name, if the field is created manually using 'parent_link'
add_model_if_regular(super_cls, field_name, result) add_model_if_regular(super_cls, field_name, result)