(self, cls)
return field_map
Returns dict mapping fields names to model attribute names
Returns dict mapping fields names to model attribute names
Returns dict mapping fields names to model attribute names
def get_field_map(self, cls):
        """Returns dict mapping fields names to model attribute names"""
        field_map = {field: field for field in self.fields}
        all_fields = {f.name: f.attname for f in cls._meta.fields}
        field_map.update(**{k: v for (k, v) in all_fields.items()
                            if k in field_map})
        return field_map
def get_field_map ( self , cls ) : field_map = { field : field for field in self . fields } all_fields = { f . name : f . attname for f in cls . _meta . fields } field_map . update ( * * { k : v for ( k , v ) in all_fields . items ( ) if k in field_map } ) return field_map