rename the articles_list in the category view
This commit is contained in:
parent
fb6831920c
commit
62db260ec1
|
@ -1,7 +1,7 @@
|
|||
{% extends "webshop/base.html" %}
|
||||
{% block section_title %}Category Overview{% endblock %}
|
||||
{% block content %}
|
||||
{% if article_list %}
|
||||
{% if articles_list %}
|
||||
<table class="table">
|
||||
<tr class="table_header">
|
||||
<th scope="col">ID</th>
|
||||
|
@ -10,7 +10,7 @@
|
|||
<th scope="col">STOCK</th>
|
||||
<th scope="col">PRICE</th>
|
||||
</tr>
|
||||
{% for article in article_list %}
|
||||
{% for article in articles_list %}
|
||||
<tr class="table_content">
|
||||
<td scope="col">{{ article.id }}</td>
|
||||
<td scope="col">
|
||||
|
|
|
@ -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})
|
||||
|
||||
|
|
Loading…
Reference in New Issue