One of the great things about Django is that it makes creating forms painless and easy. However, it's not always obvious how to do certain things if you don't already know the functions. Creating an "edit form" from an existing Model object instance is one of those cases. For this one uses the django.forms.models function, model_to_dict, to convert an entire object instance into a dictionary. Then pass this dictionary to the Form initialization function:
from django.forms.models import model_to_dict
import forms
person = Person.objects.get(id=person_id)
dictionary = model_to_dict(person, fields=[], exclude=[])
form = forms.PersonForm(dictionary) # assuming you have a predefined PersonForm for the Person Model
Easy! Just fill the optional fields parameter with all the fields you wish to have editable, or the exclude parameter to exclude certain attributes. But there is an even easier way, that I would recommend. That is to use the instance optional parameter when creating a form. This binds the form to a specific object instance, like so:
person = Person.objects.get(id=person_id)
form = forms.PersonForm(instance=person, exclude=[])
Which is even shorter than the first example. Both are perfectly valid, and are appropriate in different situations. The latter, however, will be the one you use most often.