R
R
Razilator2020-04-28 19:54:30
Django
Razilator, 2020-04-28 19:54:30

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 question

Ask a Question

731 491 924 answers to any question