What's new? | Help | Directory | Sign in
Google
django-diario
Blog application for Django projects
  
  
  
  
    
Search
for
Updated Feb 07, 2008 by semente
Labels: Deprecated
TemplateTagsUsage  
django-diario template tags usage

(DEPRECATED) MOVED TO http://django-diario.googlecode.com/svn/trunk/docs/tags.txt


Template Tags Usage

To access django-diario template tags in a template, use the {% load %} tag:

{% load django_tags %}

Tag reference

get_diario_entries

Fetch entries on a range.

Usage examples

{% get_diario_entries 1 to 5 as latest_entries %}

{% for entry in latest_entries %}
<div>
  <h2><a href="{{ entry.get_absolute_url }}">{{ entry.title }}</a></h2>

  <p>{{ entry.pub_date|date:"F j, Y" }}</p>

  {{ entry.body }}
</div>
{% endfor %}  

You can fecth old entries:

{% get_diario_entries 11 to 20 as old_entries %}

get_diario_month_list

Get list of months that have entries.

Usage example

{% get_diario_month_list as archive %}

{% for month in archive %}
<ul>
  <li><a href="{% url diario-archive-month month.year,month.month %}">{{ month|date:"F, Y" }}</a></li>
</ul>
{% endfor %}

Sign in to add a comment