[Fixed]-Reverse for 'post_edit' with arguments '()' and keyword arguments '{'pk': 6}' not found. 0 pattern(s) tried: []

1👍

The blog app is under the namespace blog. Every reference to a URL to this app should be of the form namespace:url_name.

So, you should use a namespace inside the {% url %} template tag. You are doing it correctly inside the offending template and you should do the same inside the base template too.

So inside base.html (and anywhere else blog urls are involved):

<!-- base.html -->

{% url 'blog:post_new' %}
{% url 'blog:post_draft_list' %}

Leave {% url 'login' %} and {% url 'logout' %} as is. They are not namespaced.

👤nik_m

Leave a comment