Add navigation bar and fix the bug of "too many values to unbound"

This commit is contained in:
2012-11-17 09:46:33 +01:00
parent 4d89ccefb5
commit 16c2c73389
5 changed files with 72 additions and 25 deletions

View File

@@ -1,6 +1,7 @@
{% extends "templates/base.html" %}
{% block content %}
<a href="/blog/{{ blog.id }}?page=0">Home</a> <a href="/category/{{ blog.id }}">Categories</a> <a href="/tag/{{ blog.id }}">Tags</a><br/><br/>
{% if categories|length == 0 %}
<b>Any category available</b><br/><br/>
{% else %}

View File

@@ -31,4 +31,8 @@
{% endfor %}
{% endif %}
</table>
<br/><br/>
{% autoescape off %}
<center>{{ navigation_bar }}</center>
{% endautoescape %}
{% endblock %}

View File

@@ -1,6 +1,7 @@
{% extends "templates/base.html" %}
{% block content %}
<a href="/blog/{{ blog.id }}?page=0">Home</a> <a href="/category/{{ blog.id }}">Categories</a> <a href="/tag/{{ blog.id }}">Tags</a><br/><br/>
{% if tags|length == 0 %}
<b>Any tag available</b><br/><br/>
{% else %}

View File

@@ -1,7 +1,7 @@
{% extends "templates/base.html" %}
{% block content %}
<a href="/blog/{{ blog.id }}">Home</a> <a href="/category/{{ blog.id }}">Categories</a> <a href="/tag/{{ blog.id }}">Tags</a>
<a href="/blog/{{ blog.id }}?page=0">Home</a> <a href="/category/{{ blog.id }}">Categories</a> <a href="/tag/{{ blog.id }}">Tags</a>
{% if user.is_superuser %}
<form action="/blog/edit/{{ blog.id }}" method="post">
{% csrf_token %}
@@ -24,4 +24,8 @@
{% endfor %}
{% endif %}
</table>
<br/><br/>
{% autoescape off %}
<center>{{ navigation_bar }}</center>
{% endautoescape %}
{% endblock %}