web_AI-5/django/didgeridoo/webshop/templates/webshop/index.html

18 lines
609 B
HTML
Raw Normal View History

{% extends "webshop/base.html" %}
{% block content %}
2017-12-17 19:37:49 +01:00
{% if category_list %}
<ul>
2017-12-17 19:37:49 +01:00
{% for category, sub_category in category_list.items %}
<li><a href="{% url 'category' category.id %}">{{ category.name }}</a></li>
{% for i in sub_category %}
<ul>
2017-12-17 19:37:49 +01:00
<li><a href="{% url 'category' i.id %}">{{ i.name }}</a></li>
</ul>
{% endfor %}
{% endfor %}
</ul>
{% else %}
<p>No categories are available.</p>
{% endif %}
{% endblock %}