I'm relatively new to Django, and I've been trying to find a way to implement a ManyToMany field whose visible 'choices' within the UI change based upon a BooleanField found within the same model.
For instance, suppose I have a model that represents different jobs, and a worker model that has a manytomany relationship to this jobs model. Suppose also that there are two types of workers: a manager and non-manager which is represented as a BooleanField. If you are a manager, you have certain jobs that a worker does not have and vice versa.
I'm trying to find a way, without creating a new table, to have it such that the jobs listed within the manytomany relationship are dependent on the boolean value of 'is_manager'. That is, if you were to click 'is_manager', this should list manager-specific jobs, yet these manager specific jobs live within the same table as non-manager jobs -- those would just be blank.
I've been looking into the through field, etc, but all solutions that I come up with seem to be dependent on making another table. I'm sure there is a way to do this better though.
Thank you.