== Example views == This is an example to break up long lists into several pages. It uses one url (get) variable "?offset=xxx" {{{ def item_index(request): offset = int(request.GET.get("offset", 0)) item_count = items.get_count() limit=50 if (offset + limit) < (item_count - 1): new_offset = offset + limit else: limit= (item_count - offset) new_offset = False latest_item_list = items.get_list(order_by=['-date'], offset=offset, limit=limit) return render_to_response('item/list', { 'latest_item_list': latest_item_list, 'item_count': item_count, 'from': offset + 1, 'to': limit, 'offset': new_offset, }) }}} This is the template I use. It’s a very simple one, only displaying a row counter and a date column: {{{ {% if latest_item_list %}

{% if item_count %} There {% ifequal item_count "1" %}is{% endifequal %} {% ifnotequal item_count "1" %}are{% endifnotequal %} {{ item_count }} item{{ item_count|pluralize }}. {% else %} No itemcount provided to the template {% endif %} You are looking at {{ from }} to {{ to }}.

{% for item in latest_item_list %} {% endfor %}
#Date
{{ forloop.counter }} {{ item.date }}
{% else %}

There are no items available.

{% endif %}

{% if offset %} next {% else %} End of list. {% endif %}

}}}