This repository has been archived by the owner on Apr 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Lisa Flinn
authored and
Lisa Flinn
committed
Feb 14, 2020
1 parent
cc9dba2
commit 6de4a8f
Showing
8 changed files
with
38 additions
and
147 deletions.
There are no files selected for viewing
Binary file not shown.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from django import template | ||
from rango.models import Category | ||
|
||
register = template.Library() | ||
|
||
@register.inclusion_tag('rango/categories.html') | ||
def get_category_list(current_category=None): | ||
return {'categories': Category.objects.all(), | ||
'current_category': current_category} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
from django.conf.urls import url | ||
from django.urls import path | ||
from rango import views | ||
app_name = 'rango' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<ul> | ||
{% if categories %} | ||
{% for c in categories %} | ||
{% if c == current_category %} | ||
<li> | ||
<strong> | ||
<a href="{% url 'rango:show_category' c.slug %}">{{ c.name }}</a> | ||
</strong> | ||
</li> | ||
{% else %} | ||
<li> | ||
<a href="{% url 'rango:show_category' c.slug %}">{{ c.name }}</a> | ||
</li> | ||
{% endif %} | ||
{% endfor %} | ||
{% else %} | ||
<li><strong>There are no categories present.</strong></li> | ||
{% endif %} | ||
</ul> |