Use object.url to get the url for author, category and tags

This commit is contained in:
Kyle Fuller
2012-05-14 18:17:00 +01:00
parent 2e0d1cae62
commit 9c349d82c6
42 changed files with 74 additions and 74 deletions

View File

@@ -85,7 +85,7 @@
</li>
{% for cat, null in categories %}
<li><a href="{{ SITEURL }}/category/{{ cat }}.html">{{ cat }}</a></li>
<li><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>
{% endfor %}
</ul>
</div>

View File

@@ -3,7 +3,7 @@
{% block content %}
<ul>
{% for category, articles in categories %}
<li><a href="{{ SITEURL }}/category/{{ category }}.html">{{ category }}</li>
<li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</li>
{% endfor %}
</ul>

View File

@@ -1,13 +1,13 @@
{{ article.date.strftime("%d %b %Y") }}
{% if article.author %}
by <a class="url fn" href="{{ SITEURL }}/author/{{ article.author }}.html">{{ article.author }}</a>
by <a class="url fn" href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a>
{% endif %}
{# Filed under <a href="{{ SITEURL }}/category/{{ article.category }}.html">{{ article.category }}</a> #}
{# Filed under <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a> #}
{#
{% if article.tags %}
Tags {% for tag in article.tags %}<a href="{{ SITEURL }}/tag/{{ tag }}.html">{{ tag }}</a> {% endfor %}
Tags {% for tag in article.tags %}<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> {% endfor %}
{% endif %}
#}

View File

@@ -3,7 +3,7 @@
{% block content %}
<ul>
{% for tag, articles in tags %}
<li><a href="{{ SITEURL }}/tag/{{ tag }}.html">{{ tag }}</li>
<li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</li>
{% endfor %}
</ul>
{% endblock %}