[Fixed]-How to use View data to fill in django forms

1👍

When you first define a form, you can define it as so:

form = forms.profile({
       'first_name': first_name,
       'last_name': last_name,
       ...
       })

where the key is the name of the field in your form.

Also, just as an aside be careful when using python builtins like zip as fields in your forms or models

Leave a comment