[Django]-Add a new choice to django choice fields

6đź‘Ť

âś…

There is a pattern for “dynamic choices”: it is called foreign keys.

Don’t try and implement this by hacking the choices tuple. If you want your model to have a set of dynamic options, you should make a ForeignKey pointing at a separate model that records those choices.

Leave a comment