Fwd: [django] Excluir un ítem de un dropdown en el admin de django

12 views
Skip to first unread message

Rafael E. Ferrero

unread,
Jun 20, 2017, 1:25:00 AM6/20/17
to django...@googlegroups.com
I have to make a parent relation between two people (brother/sister, father/mother, etc) in my projec.
I have a Person class and a child class named Firefighter. What I need it's to indicate the parent relation between the selected Firefighter and the selected Person, for that I have two dropdown in my Django Admin.

The trouble it's because Firefighter class is a child of Person class so the Firefighter item are in the two dropdowns and it shouldn't

How can I exclude the selected Firefighter item from Person's dropdown ??

Best regards!!

Rafael E. Ferrero


Melvyn Sopacua

unread,
Jun 20, 2017, 4:32:45 PM6/20/17
to django...@googlegroups.com

On Tuesday 20 June 2017 02:24:20 Rafael E. Ferrero wrote:

 

 

> The trouble it's because Firefighter class is a child of Person class

> so the Firefighter item are in the two dropdowns and it shouldn't

 

Are you sure a firefighter is a person? Or is it the person's job?

 

Show your models, cause it's likely your setup is wrong.

--

Melvyn Sopacua

Reply all
Reply to author
Forward
0 new messages