[Answered ]-UpdateView form pre-populate error

2👍

Solved !!

I was making a mistake of using ‘POST’ method in the Edit Link.

<form method='post' action="{% url 'photo_update' username=username pk=photo.pk %}">
     {% csrf_token %}
     <input type="submit" value="Edit Photo" class="btn btn-primary">
</form>

changed to

<form action="{% url 'photo_update' username=username pk=photo.pk %}">
    {% csrf_token %}
    <input type="submit" value="Edit Photo" class="btn btn-primary">
</form>
👤sunny

Leave a comment