Reputation: 13
here is my path
path('<slug:category_slug>/<slug:city_slug>/<slug:slug_text>/', views.category_view_detail,
name='post_detail'),
how to write URL for this example {% url 'post_delete' posts.slug %} but i want to add all three slug inside the URL how to do something like this... ({% url 'post_detail' posts.category posts.city posts.slug %}) but this not work..
Upvotes: 0
Views: 113
Reputation: 2045
I think it is not working because you are referring to a different URL pattern name
You are using post_delete
the one in the code is post_detail
{% url 'post_detail' posts.slug posts.city posts.slug %}
# or
{% url 'post_detail' category_slug=posts.category city_slug=posts.city slug_text=posts.slug %}
Upvotes: 1