[Django]-Reverse for 'edit' with no arguments not found. 1 pattern(s) tried: ['articles/edit/(?P<pk>[0-9]+)/$']

10👍

In your template article_edit.html – post url is expecting a pk, you need to pass a pk just like you are doing it for template my_articles.html

<div class="create-article"><form class="site-form" action="{% url 'articles:edit' pk=form.instance.pk %}" method="post" enctype="multipart/form-data">{% csrf_token %}...

This way django knows which article you are editing

Leave a comment