Re: I am getting this error plz help me out of this.

2020-09-11 Thread Hedrick Godson's
In ur anchor tag in template {% url "xyz:rst" post.pk %} On Thu, 10 Sep 2020, 20:15 amr wrote: > In your views function you passed a (pk) so you must pass it in your path > in (urls.py) as > path('postdetail//', views.post_detail, name='post_detail') > Then in your template in(href="{% url 'appn

Re: I am getting this error plz help me out of this.

2020-09-10 Thread amr
In your views function you passed a (pk) so you must pass it in your path in (urls.py) as path('postdetail//', views.post_detail, name='post_detail') Then in your template in(href="{% url 'appname:post_detail' post.id %}") and you will redirect to your url as (localhost:port/postdetail/1) or 2