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
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
2 matches
Mail list logo