Re: Grrr, can't import custom template tag

2008-04-28 Thread Jay

Hi!  Yes, in fact on the development server it works fine.  On the
production server I'm using lighttpd/fcgi, and I have stopped and
restarted both approximately 800 times.  It's very strange.  I feel
like it must be something to do with my server configuration.  I have
the exact same versions of django/satchmo on both dev & production.

I was temporarily able to get it to import the tag by dropping it into
django/templatetags, but I don't like that solution as I will likely
forget and overwrite that directory the next time I update django.

On Apr 28, 4:13 am, David Reynolds <[EMAIL PROTECTED]>
wrote:
> On 28 Apr 2008, at 1:35 am, Jay wrote:
>
> > 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.
>
> If you're running on Apache, have you restarted it? Have you stopped  
> and started your development server?
>
> --
> David Reynolds
> [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Grrr, can't import custom template tag

2008-04-28 Thread David Reynolds


On 28 Apr 2008, at 1:35 am, Jay wrote:

> 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.

If you're running on Apache, have you restarted it? Have you stopped  
and started your development server?

-- 
David Reynolds
[EMAIL PROTECTED]



--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Grrr, can't import custom template tag

2008-04-27 Thread Jay

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 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
-~--~~~~--~~--~--~---



Grrr, can't import custom template tag

2008-04-27 Thread Jay

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 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
-~--~~~~--~~--~--~---