No Reverse Match

I’ve created a view function post_share(request, post_id) :
with
post = get_object_or_404(Post, id = post_id)

Also in my url.py I’ve a path
app_name = ‘blog’
path(‘int:post_id/share/’, views.post_share, name = “post share”)

Now I’m trying to render views.post_share on my template
{% url ‘blog:post_share’ post.id %}

But getting an error that says "No Reverse Match at (page url)
Reverse for ‘post_share’ not found. ‘post_share’ isn’t a valid view function.

How do I fix this issue? I’ve already cross checked the all the patterns name and view function name they all match.

Your view is named “post share”, not “post_share”.

You have defined it:

But are trying to access it as:

1 Like

I just noticed that… Thanks to you :heart: