DJango model logic

is it possible to have a logic based on the choices like:

class model(models.Model):
    a = something(choices)
    b = foreingkey to c 
etc

and then if a choices are yes show c ForeignKey table

or just like that

class model(models.Model):
    a = something(choices)
    b = something else
etc

if a choice is yes show b else only a

that is not possible, we can't have dynamic foreign keys.

Back to Top