diff --git a/django/didgeridoo/webshop/templates/webshop/category.html b/django/didgeridoo/webshop/templates/webshop/category.html index 5ea3a14..9b99c4a 100644 --- a/django/didgeridoo/webshop/templates/webshop/category.html +++ b/django/didgeridoo/webshop/templates/webshop/category.html @@ -1,7 +1,7 @@ {% extends "webshop/base.html" %} {% block section_title %}Category Overview{% endblock %} {% block content %} - {% if article_list %} + {% if articles_list %} @@ -10,7 +10,7 @@ - {% for article in article_list %} + {% for article in articles_list %}
IDSTOCK PRICE
{{ article.id }} diff --git a/django/didgeridoo/webshop/views.py b/django/didgeridoo/webshop/views.py index 072fe44..43911fc 100644 --- a/django/didgeridoo/webshop/views.py +++ b/django/didgeridoo/webshop/views.py @@ -69,12 +69,12 @@ def articles_in_category(request, category_id): selected_category = Category.objects.get(id=category_id) hidden = ArticleStatus.objects.get(name="hidden") - article_list = Article.objects.filter( - category=selected_category.id).exclude(status=hidden.id) + articles_list = Article.objects.filter( + category=selected_category.id).exclude(status=get_hidden_status_id()) return render(request, 'webshop/category.html', - {'article_list': article_list, + {'articles_list': articles_list, 'category_list': category_list, 'category': selected_category})