Answer the question
In order to leave comments, you need to log in
How to remove articles from a category when switching to a category?
I wanted to display a list of articles from categories, I go to a certain category, and there are articles from another category.
view.py. Am I filtering the relation of an article to a category incorrectly?
class CategoryListView(ListView):
queryset = Article.objects.filter(category__article=True)
template_name = "articles/article_list.html"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question