Even more frustrating is that I just checked in the python shell and
can successfully load paginate:
#python
Python 2.5.1 (r251:54863, Mar 7 2008, 03:39:23)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from django.template import Template
>>> t = Template('{% load paginate %}')
>>>
So I can load it in the shell but not in my template file. Hmm.
On Apr 27, 8:35 pm, Jay <[EMAIL PROTECTED]> wrote:
> Hi, all. I think I have an uncommon problem here--I've been looking
> into it for hours, and it's driving me crazy.
>
> I'm trying to install a custom paginator template tag in Django
> revision 7403. I'm getting the error message:
>
> 'paginate' is not a valid tag library: Could not load template library
> from django.templatetags.paginate, No module named paginate
>
> But I think I have all the bases covered. I have the app installed in
> settings.py, and I am able to import everything inside the template
> tag module, so I don't think there are any imports failing.
>
> Here's what I have:
>
> myproject/
> utils/
> __init__.py
> templatetags/
> __init__.py
> paginate.py
>
> paginate.py is exactly as it is
> here:http://www.djangosnippets.org/snippets/673/
>
> In settings.py, I have installed utils:
>
> INSTALLED_APPS = (
> ... other installed apps ...
> 'mysite.utils',
> )
>
> I can import utils and all the modules within utils in python:
>
> # python
> python 2.5.1 (r251:54863, Mar 7 2008, 03:39:23)
> [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>
> >>> import mysite.utils
> >>> from django import template
> >>> from django.db.models.query import QuerySet
> >>> from django.core.paginator import Paginator, QuerySetPaginator
>
> And then in my template:
>
> {% load paginate %}
>
> And I think that's it. This is really driving me crazy. Is there
> anything I'm forgetting? Anything obvious? I would be extremely
> grateful if someone could give this a once-over and let me know what
> I'm missing.
>
> Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---