I'd like to try to fix the bug for ticket #2522 and #2470
(both are apparently the same).
I'm studying the code and trying to understand the possible reason
for ther error. Although new to Django, I have a reasonable
knowledge of Python. However, I'd like some help from someone more
experienced with Django code. Here's what I found until now.
When rendering the admin page I get an error at:
{% for related_object in inline_related_objects %}
In admin_modify.EditInlineNode(), the following piece of
code, in the "else" path, assigns to "bound_related_object_class"
a bool field, although a callable is expected.
if relation.field.rel.edit_inline == models.TABULAR:
bound_related_object_class = TabularBoundRelatedObject
elif relation.field.rel.edit_inline == models.STACKED:
bound_related_object_class = StackedBoundRelatedObject
else:
bound_related_object_class = relation.field.rel.edit_inline
The class is then passed to related.RelatedObject.bind() which,
in turns, tries to call it and then the "bool object is not callable"
exception is raised. Here's the code snippet raising the exception
def bind(self, field_mapping, original,
bound_related_object_class=BoundRelatedObject):
return bound_related_object_class(self, field_mapping, original)
Both the StackedBoundRelatedObject and TabularBoundRelatedObject
inherit from related.BoundRelatedObject.
I'm suspecting that a proper class should be passed when edit_inline
isn't neither TABULAR nor STACKED. Am I right? Could anyone give me
some hint on how to go ahead tyring to fix this bug?
I already did try to pass the TabularBoundRelatedObject under the
"else" condition, but it didn't work either (more errors).
If someone more experienced with Django code can give me some hint
I'll be glad to spend some time trying to solve this bug.
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---