Skip to content

Commit

Permalink
Update to template tags to include ways to retrieve an object from a …
Browse files Browse the repository at this point in the history
…model other than Category.
  • Loading branch information
coordt committed Jul 11, 2012
1 parent 2a501a3 commit fa470df
Show file tree
Hide file tree
Showing 29 changed files with 1,119 additions and 658 deletions.
8 changes: 3 additions & 5 deletions categories/templates/categories/breadcrumbs.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{% for item in category.get_ancestors %}
<a href="{{ item.get_absolute_url }}">{{ item.name }}</a>
{{ separator }}
{% endfor %}
{{ category.name }}
{% spaceless %}{% for item in category.get_ancestors %}
<a href="{{ item.get_absolute_url }}">{{ item.name }}</a>{{ separator }}{% endfor %}{{ category.name }}
{% endspaceless %}
4 changes: 2 additions & 2 deletions categories/templates/categories/ul_tree.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load category_tags %}
{% load category_tags %}{% spaceless %}
<ul><li><a href="{% url categories_tree_list %}">Top</a>
{% for node,structure in path|tree_info %}
{% if structure.new_level %}<ul><li>
Expand All @@ -8,4 +8,4 @@
{% else %}<a href="{{ node.get_absolute_url }}">{{ node.name }}</a>
{% endifequal %}
{% for level in structure.closed_levels %}</li></ul>{% endfor %}
{% endfor %}</li></ul>
{% endfor %}</li></ul>{% endspaceless %}

0 comments on commit fa470df

Please sign in to comment.