Thanks for the advice Peter.

I did what you said, and nothing showed (meaning the {% if
is_paginated %} was false).

How would I make it so is_paginated=True? I don't see how this is set
anywhere.

When i removed the IF statement so I could just see if the {% load
paginator %} code worked I get this error:

KeyError at /menu/pagination/
'page'
Request Method:         GET
Request URL:    http://nushi.webfactional.com/menu/pagination/
Exception Type:         KeyError
Exception Value:        'page'
Exception Location:     /home/nushi/lib/python2.5/django/template/
context.py in __getitem__, line 40

I think this is referring to my paginator.py:
-------
from django import template
from sakushi.menu.models import Menu

register = template.Library()

def paginator(context, adjacent_pages=2):
    """
    To be used in conjunction with the object_list generic view.

    Adds pagination context variables for use in displaying first,
adjacent and
    last page links in addition to those created by the object_list
generic
    view.
    """
    page_numbers = [n for n in \
                    range(context["page"] - adjacent_pages,
context["page"] + adjacent_pages + 1) \
                    if n > 0 and n <= context["pages"]]
    return {
        "hits": context["hits"],
        "results_per_page": context["results_per_page"],
        "page": context["page"],
        "pages": context["pages"],
        "page_numbers": page_numbers,
        "next": context["next"],
        "previous": context["previous"],
        "has_next": context["has_next"],
        "has_previous": context["has_previous"],
        "show_first": 1 not in page_numbers,
        "show_last": context["pages"] not in page_numbers,
    }

register.inclusion_tag("tag_paginator.html", takes_context=True)
(paginator)
----------------


Once again any suggestions are greatly appreciated.

Duncan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to