2👍
You can have 2 different selects One for politic and one for economic and show/hide them based on choice field.
Or maybe Abstract Model Inheritance would solve your problem
- [Answered ]-Deploy bitnami django
- [Answered ]-How to test a Django view which has transaction.atomic(using=myDb)?
- [Answered ]-Server side problems saving a file uploaded using requests.POST
0👍
Thanks for your answers, I try to use your two solutions (Abstract Model and Generic Relation) but it doesn’t resolve my problem.
So I create two differents ModelChoiceField (one for Politic and one for Economic) and I use hide/show effects of Jquery in my template (like you say Kugel).
But if you have any others ideas for my problem, I’m interessed.
👤Baba
- [Answered ]-Django Error –SyntaxError: invalid syntax
- [Answered ]-Django – FormView combined with Mixin
- [Answered ]-Getting error while using HttpRequest.build_absolute_uri(location) in Django
- [Answered ]-2 OneToOneField defined for two tables. One got deleted but not other
Source:stackexchange.com