[Answered ]-Django model form doesn't populate when instance=object is set

2👍

Because you’re also passing request.POST. That is supposed to contain the submitted data, which would naturally override the values already in the instance; but since you’re doing that on a GET, the POST data is empty, so your form is displayed empty.

Only pass request.POST into the form when the request is actually a POST.

Leave a comment