Malcolm Tredinnick wrote:
> On Tue, 2007-06-12 at 05:44 -0400, Andrew R wrote:
>> I have to admit, though, that I think adding a custom filter should be as
>> simple
>> as this code alone:
>>
>>> from django.template import Library
>>>
>>> register = Library()
>>>
>>> @register.filter
>>> def jav
On Tue, 2007-06-12 at 05:44 -0400, Andrew R wrote:
> James Bennett wrote:
> > So long as your code is in a location where your code can be imported
> > by Python, there is another way; there are a couple of undocumented
> > functions in the template system which handle the loading of tag
> > libra
James Bennett wrote:
> So long as your code is in a location where your code can be imported
> by Python, there is another way; there are a couple of undocumented
> functions in the template system which handle the loading of tag
> libraries.
> [snip]
> So something like
>
> from django.temp
On 6/9/07, Andrew R <[EMAIL PROTECTED]> wrote:
> I think a better long term solution is something like:
>
> Template.add_templatetags_file('filename.py')
>
So long as your code is in a location where your code can be imported
by Python, there is another way; there are a couple of undocume
James Bennett wrote:
> On 6/6/07, Andrew R <[EMAIL PROTECTED]> wrote:
>> whereas I just want it to import "javadoc_filter" from my current dir. I'm
>> sure
>> this is by design in django but there must be a way around it.
>
> This is one of the tricky bits of Django that you don't often see.
> D
On 6/6/07, Andrew R <[EMAIL PROTECTED]> wrote:
> whereas I just want it to import "javadoc_filter" from my current dir. I'm
> sure
> this is by design in django but there must be a way around it.
This is one of the tricky bits of Django that you don't often see.
Django needs to have some consist
All,
I have a code generating program that using django's nifty template packages.
It all worked well until I wanted to use a custom filter.
No matter what I try, I get:
django.template.TemplateSyntaxError: 'javadoc_filter' is not a valid tag
library: Could not load template library from
7 matches
Mail list logo