[Answered ]-NoReverseMatch at / error when implementing a comment option

1👍

I have solved my problem !
I needed to change the way i was calling my url as it was the old way.

 path('post/<int:pk>/', core_views.post_detail, name='post-detail')

This was the correct way to do it.

👤seaiam

0👍

First, the last tag has the post detail URL but without the required integer variable.

Second, you shouldn’t loop through posts because it is a single object.

Third, according to the view you are showing, there is no context variable named ‘posts’. It’s post.

👤Chymdy

Leave a comment