object has no attribute ‘get’

Your problem is here:

intention = Intention.objects.get(pk=id)
form = IntentionForm(intention) # An unbound form

The first argument to a form is the data but you are passing the instance. To properly pass the instance you should use:

intention = Intention.objects.get(pk=id)
form = IntentionForm(instance=intention) # An unbound form

Leave a Comment