The easiest way to do that with the least code would be with the class based UpdateView.
Here is the link to the Django Docs:
https://docs.djangoproject.com/en/dev/ref/class-based-views/generic-editing/#django.views.generic.edit.UpdateView
A views.py code sample would be:
from django.views.generic.edit import UpdateView
from myapp.models import Person
class PersonUpdate(UpdateView):
model = Person
fields = ['name', 'lastname']
template_name_suffix = '_update_form'
Then just add the form in your template. By default the template name will be person_update_form.html
The template code just looks like:
<form action="" method="post">
{% csrf_token %}
{{ form }}
<input type="submit" value="Submit" />
</form>
This will also automatically populate the form with any initial form data from the Person object that you are trying to update.
Edit:
To update an object based on a dict of the object you want to:
get the object
person = Person.object.get(name='John')
update it
# if this is the new lastname
d = {'lastname':'Smith'}
# then access the dict and update it
person.lastname = d['lastname']
save the object
person.save()
You don't need to use the form if you are not using a template.