[Answer]-How to create a dynamic choices of model field in django

1👍

Why would you store Owner as a CharField? If it’s a reference to a User object, it should be a ForeignKey.

Edit after comment Your data model seems broken. Nevertheless, if you really want to keep it as a CharField, you should not try to set the choices in the model at all. Define a custom form and either use a ModelChoiceField or set the choices in the form’s __init__ method.

Leave a comment