Electronics & Programming


Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » Using arbitrary queries to populate InlineModelAdmin instances [RSS Feed]

#1 Jan. 17, 2011 12:38:07

Dan F.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Using arbitrary queries to populate InlineModelAdmin instances

Hello list,

I have a use case where I want to show a few other objects as inline
editable fields, but have been stymied by the fact that there exists
no direct foreign key relationship between them. Here is an example:
Outermost_Model -> Inner_Model -> Django User Model, where '->' is a
foreign key reference. I want to edit Outermost_Model instances from
a Django User instance. I feel as though I studied the documentation
athttp://docs.djangoproject.com/en/dev/ref/contrib/admin/and even
some of the admin source code carefully, but am left unenlightened
after some experimentation on how to accomplish this without severe
hackery, or if there's another way I should be approaching this

In general, I do not fully understand why there are no *apparent*
provisions to allow for a developer to provide model instances
(writing their own queries...) that they desire to be inline-editable
given the "parent" instance. If passed a User object, for example, I
could fairly easily return the Outermost_Model instances I want
rendered inline.

Seeking enlightenment,

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
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.


  • Root
  • » Django
  • » Using arbitrary queries to populate InlineModelAdmin instances [RSS Feed]

Board footer

Moderator control

Enjoy the 27th of May

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support