Skip to content

Commit

Permalink
Add link for each category badge
Browse files Browse the repository at this point in the history
  • Loading branch information
huangsam committed Jul 12, 2020
1 parent 87ca86b commit 5eff572
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion places/templates/places/restaurant_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
<h1>{{ restaurant.name }}</h1>
<div id="categories">
{% for category in restaurant.categories.all %}
<span class="badge badge-secondary">{{ category.name }}</span>
<a href="{% url 'places:restaurant-list' %}?category={{ category.name }}"
class="badge badge-secondary">{{ category.name }}</a>
{% endfor %}
</div>
<hr>
Expand Down

0 comments on commit 5eff572

Please sign in to comment.