On Thu, Jun 30, 2011 at 5:21 PM, Carlos Daniel Ruvalcaba Valenzuela <
[email protected]> wrote:

> Thanks for all your comments, currently I'm focusing on adding custom
> extensions and filter support to Jinja2 renderer, I would like to hear
> a few opinions on this feature:
>
> Should we have a special place where you can code custom filters and
> extensions and have it loaded automatically if the Jinja2 renderer is
> chosen (like django extensions/filters)?
>

If so, where would be the best place to put this? on lib?, maybe I can
> make the loader look up at lib for extensions.py and filters.py, or
> have a special directory for them?, currently django has a directory
> called templatetags for this, we could have one in lib/
>

I think that for extenions they are better managed in the configuration
file.
Filters, instead, might be a good candidate for being included in the
project and automatically loaded as I see them more related to helpers.

If we really want to do this we might consider creating a lib.something
module and handle all the template related extensions and functions there.
So that we will have lib.something.helpers, lib.something.jinja_filters,
lib.something.whatever and people know that for any template filter, helper
etc they can look there.
I just don't have any idea on how "lib.something" should be called, but I
think that it is better than putting everything in lib alone which might
bring us to have lib.this, lib.that, lib.future_idea caos.

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en.

Reply via email to