Malcolm Tredinnick wrote:
> On Fri, 2006-08-11 at 10:50 +0200, Mario Graziosi wrote:
>   
>> I have a tough problem representing my data model
>> with Django when using the standard Admin Interface.
>>
>> I need to represent the concept of a callgroup: a list
>> of items (either persons or, again, callgroups) to
>> which phone calls should be dispatched in a given sequence.
>> The model is illustrated at the end of this mail.
>>
>> However, when I try to use the Admin interface it seems to get
>> confused:
>>
>> 1. If I set editable=False in callgroup_owner the Admin interface
>> gets confused because there are two foreign keys from CallgroupItem
>> to Callgroup: callgroup_owner and callgroup_member. In fact the
>> Admin interface shows a TABULAR list of Callgroup items and, also,
>> a STACKED list (however, only one should be shown).
>>
>> 2. If I set editable=True in callgroup_owner when I try to Add a new
>> callgroup I get KeyError exception with the following offending
>> template line:
>>
>>    {% for related_object in inline_related_objects %} ...
>>
>> I'm using version 0.96-pre of Django.
>>
>> It seems that Django has some serious restrictions when there are
>> two foreign keys pointing to the same Model and one of them has
>> the edit_inline attribute set.
>>
>> Does anyone have any idea of if/what I'm doing wrong? Is this a bug in
>> Django and I should report it?
>>     
>
> It's a bug, I'm pretty sure. There are some similar sounding bugs in the
> ticket tracker from memory, but you have a pretty good example and clear
> explanation here, so if you could file those into a ticket that would be
> most helpful.
>
> I must admit that I've been putting off looking at that particular group
> of bugs because they sound unpleasant to fix and that part of the code
> makes my brain hurt. But we're starting to get a collection of them now.
> Might be time to suck it up and fix them.
>
> Malcolm
>
>
> >
>
>   
Malcom,

thanks for your help. As you suggested, I just submitted a ticket 
regarding this problem (Ticket #2522, 
http://code.djangoproject.com/ticket/2522).

I would be glad to help to fix/solve this problem. However I'm quite new 
with Django and I suspect that I couldn't be of much help. If you might 
direct me to which modules/classes to start looking at, I might try to 
take a look at the problem and try to fix it. Or, I might also help in 
providing more info to isolate or diagnose the bug, or even to document it.

Let me know If I can help somehow.

Mario


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to