Thanks Russ, I was missing __init__.py in the templatetags
dir
Now I've got other error messages to fix ;)
Gareth
-----Original Message-----
From: django-users googlegroups.com
[mailto:django-users googlegroups.com] On Behalf Of Russell
Keith-Magee
Sent: 29 September 2006 15:41
To: django-users googlegroups.com
Subject: Re: Include Template tags from application
directory?
On 9/29/06, DOUTCH GARETH-GDO003 <Gareth.Doutch motorola.com> wrote:
>
> However, I get the error message:
> "x is not a valid tag library: Could not load
template library from
> django.templatetags.x"
Django will automatically discover any templatetags that you
have
defined, as long as they are contained within a
'templatetags'
directory in your model directory: e.g.,
myproject/
myapp/
__init__.py
models.py
templatetags/
__init__.py
mytemplatetags1.py
mytemplatetags2.py
Where mytemplatetags[1,2].py are the 'tag libraries' -
collections of
template tags that are to be imported. If your template then
contains:
{% load mytemplatetags1 %}
any template tag registered in the 'mytemplatetags1' tag
library will be
visible to the template.
Hope this helps,
Russ Magee %-)
--~--~---------~--~----~------------~-------~--~----~
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
django-users-unsubscribe googlegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|