﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
6044	limit_choices_to in one class disable edit_inline of a second in a third class	anonymous	nobody	"I have 4 classes: A,B, AImage and BImge. All inherit from models.Model
In AImage I have

{{{
item = models.ForeignKey(A, edit_inline=models.TABULAR, num_in_admin=6)
}}}
and in BImage

{{{
item = models.ForeignKey(B, edit_inline=models.TABULAR, num_in_admin=6)
}}}

Now I add to B


{{{
def adder():
        cats = A.objects.all()
        portfolio = A.objects.get(slug='something')
        CATS={}
        for c in cats:

            if (portfolio in c.get_p_list()) or (c == portfolio):
                CATS[c.title]=c
        return CATS
    a_item = models.ForeignKey(a, limit_choices_to = {'title__in':adder()})
}}}

The result: AImage won't appear in A's admin screen. If limit_choices_to is not used in B, A will be shown correctly
"		closed	contrib.admin	dev		wontfix	limit_choices_to,edit_inline		Unreviewed	0	0	0	0	0	0
