[Answer]-Django Url error: invalid literal for int() with base 10: "python"

1👍

In django, filter(tags=tag) is a shortcut to tags__pk=tag, in your case, you have a tag name, so you should use filter(tags__name=tag)

0👍

Update following line in your tadgetails view

posts = Post.objects.filter(tags=tag)

as

posts = Post.objects.filter(tags__name=tag)
👤Rohan

Leave a comment