I am trying to display a bound ModelForm in my template.
Here the the code from the view:
assessment = Assessment.objects.get(slug=slug)
form = AssessmentForm(assessment)
But when I then pull up the template, it is empty except for the submit button.
When I try to debug with PDB, I get:
(Pdb) form.data
<Assessment: Alaska - Coastal Forests>
(Pdb) form.as_p
<bound method AssessmentForm.as_p of <cst.assessapp.models.AssessmentForm object at 0x224b190>>
(Pdb) form.as_p()
*** AttributeError: 'Assessment' object has no attribute 'get'
So, obviously, I am doing something wrong. Can somebody help?
Thanks