If i use the standard `objects` (models.Manager) as the default
manager, the all the inlines display.  If i use another manager as the
default (first listed in the model definition) that excludes some
instances, the inlines are missing.  You can see this if you change
the ordering of the managers in this app: http://dpaste.com/80185/

i believe this is because forms.BaseInlineFormSet uses the default
manager instead of a specified one.
http://code.djangoproject.com/browser/django/trunk/django/forms/models.py#L706

Is that right?



On Aug 15, 4:20 am, Zachary Voase <[email protected]> wrote:
> ...would get via the actual Python API? In this case, you couldn’t
> switch the managers around either.
>
> On Aug 15, 10:19 am, Zachary Voase <[email protected]>
> wrote:
>
> > Correct me if I’m wrong, but won’t the inlines display the actual
> > relationship that you
>
> > On Aug 14, 5:43 pm,smcoll<[email protected]> wrote:
>
> > > Currently, we can override the queryset used by ModelAdmins.  This is
> > > helpful, since often times the default manager omits instances that
> > > nevertheless belong in the admin.  It seems to me that there's no way
> > > to override the queryset for inlines, though.  Is that correct?
> > > Inlines seem to use the default manager by design, and this is another
> > > expression of the same problem.
>
> > > i came across this when i couldn't find my child model instances as
> > > inlines in the admin; the default manager for the child model was set
> > > to only show objects for the current site, and i was using the admin
> > > for several sites.
>
> > > i had posted about this earlier at django-users (http://
> > > groups.google.com/group/django-users/browse_thread/thread/
> > > 22781505121558dc/5d6a9595770afb99#5d6a9595770afb99), but now i'm
> > > thinking this has to do with the way the admin contrib app is set up.
>
> > > Here's a quick app i wrote to demonstrate the issue, with an attempted
> > > workaround (which gets the instances to show up but doesn't allow a
> > > save):http://dpaste.com/80185/
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to