Hi everyone,

I'm using 1.0.2 final. I have a form for a model and am passing in an
instance of my model object to the form, but the form is not being
populated.

#views.py example

def my_view(request, id):
    if request.method == 'POST':
        pass
    else:
        model_instance = my_model.objects.get(pk=id)
        model_form_instance = MyForm(instance=model_instance)
return render_to_response('my_template.html', {'model_form_instance' :
model_form_instance})


But, the form fields aren't being populated. What am I doing wrong?
form_for_instance is deprecated in 1.0, and everything I'm doing looks
correct from the docs at: 
http://docs.djangoproject.com/en/dev/topics/forms/modelforms/

Advice appreciated,
Brandon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to