-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored the templates to extend a categories/base.html
- Loading branch information
Corey Oordt
committed
Dec 18, 2010
1 parent
b5edbdc
commit 91227ed
Showing
4 changed files
with
34 additions
and
3 deletions.
There are no files selected for viewing
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,3 @@ | ||
{% extends 'base.html' %} | ||
{% block content %} | ||
{% endblock %} |
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,4 +1,17 @@ | ||
{% extends 'categories/base.html' %} | ||
{% load category_tags %} | ||
{% block content %} | ||
<p><tt>breadcrumbs category</tt> result: </p> | ||
{% breadcrumbs category %} | ||
<p><tt>breadcrumbs category ">"</tt> result: </p> | ||
{% breadcrumbs category ">" %} | ||
<p><tt>display_path_as_ul category</tt> result:</p> | ||
{% display_path_as_ul category %} | ||
<p><tt>display_drilldown_as_ul category</tt> result:</p> | ||
{% display_drilldown_as_ul category %} | ||
<p><tt>category.get_ancestors|category_path</tt> filter result: {{ category.get_ancestors|category_path }}</p> | ||
<h2>{{ category }}</h2> | ||
{% if category.parent %}<h3>Go up to <a href="{{ category.parent.get_absolute_url }}">{{ category.parent }}</a></h3>{% endif %} | ||
<p>{{ category.description }}</p> | ||
{% if category.children.count %}<h3>Subcategories</h3><ul>{% for child in category.children.all %}<li><a href="{{ child.get_absolute_url }}">{{ child }}</a></li>{% endfor %}</ul>{% endif %} | ||
{% if category.description %}<p>{{ category.description }}</p>{% endif %} | ||
{% if category.children.count %}<h3>Subcategories</h3><ul>{% for child in category.children.all %}<li><a href="{{ child.get_absolute_url }}">{{ child }}</a></li>{% endfor %}</ul>{% endif %} | ||
{% endblock %} |
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,2 +1,5 @@ | ||
{% extends 'categories/base.html' %} | ||
{% block content %} | ||
<h2>Categories</h2> | ||
<ul>{% for category in object_list %}<li><a href="{{ category.get_absolute_url }}">{{ category }}</a></li>{% endfor %}</ul> | ||
<ul>{% for category in object_list %}<li><a href="{{ category.get_absolute_url }}">{{ category }}</a></li>{% endfor %}</ul> | ||
{% endblock %} |
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,12 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | ||
"http://www.w3.org/TR/html4/loose.dtd"> | ||
<html lang="en"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | ||
<title>Django Categories</title> | ||
</head> | ||
<body> | ||
{% block content %} | ||
{% endblock %} | ||
</body> | ||
</html> |