[Fixed]-Can't get data in edit form

1👍

First, your if/else block is checking if the request is a POST. Since the else block is not a POST, you do not want to pass any POST data into your form. This will make the form think it’s bound with no data.

Also, it looks like you are passing the request.user to your ProfileForm as the instance, but the model on the ProfileForm meta class is expecting a Profile object.

Can you fix those two things and see if it works or not? If it doesn’t work, please post some more code (like your templates).

Leave a comment