I have a form class like this, if the db is not populated I skip that field, in the future when something thaat might trigger a d population happens and I try to render this form, it doesn't recognise the update, but once I restart the development server it renders with the newly added field? Is this how it's supposed to happen? How Can I overcome this? In production I cant just start/stop the server right? can anyone help me with this? Thank you
class Schedule(...):
try:
mails = forms.ModelChoiceField(queryset=FetchFrom.objects.all(),
to_field_name="mail",empty_label=None,initial=FetchFrom.objects.latest("id"))
except Exception as e:
mails=None