Added category link for part view

This commit is contained in:
Oliver Walters 2017-03-26 10:14:38 +11:00
parent ddd927c436
commit ef8cfa794f
2 changed files with 13 additions and 11 deletions

View File

@ -1,17 +1,16 @@
<h1>Category: {{ category.name }}</h1>
<h2>Path: {{ category }}</h2>
<br>
Path<br>
{# Construct the category path #} {# Construct the category path #}
{% for path_item in category.path %} {% for path_item in category.path %}
<a href="../{{path_item.pk}}">{{path_item.name}}</a>/ <a href="../{{ path_item.pk }}">{{ path_item.name }}</a>/
{% endfor %} {% endfor %}
<br>Parts:<br> {{ category.name }}
{% endfor %}
<br>
<br>
Parts:
<br>
{% for part in category.part_set.all %} {% for part in category.part_set.all %}
<a href="/part/{{part.pk}}">{{part.name}}</a><br> <a href="/part/{{ part.pk }}">{{ part.name }}</a><br>
{% endfor %} {% endfor %}

View File

@ -1 +1,4 @@
{{part}} {{part}}
<br>
Category: <a href="/part/category/{{ part.category.pk}}">{{ part.category }}</a>