Just FYI about the Jinja Tags -- they do work.

I've only been playing with Pylons for about 2 hours, so this method
could be the wrong way to do this, but here it is anyways:

[ lib/jinjatags.py ]
from jinja.lib import stdlib
from jinja.nodes import *

class TestTag(Node):
    rules = {
        'default': [KeywordNode('testtag')],
    }

    def __init__(self, parser, matched_tag, handler_args, stack):
        pass

    def render(self, context):
        return "Testing!!!"

stdlib.register_tag(TestTag)

[ config/environment.py ]
from helloworld.lib.jinjatags import *

[ templates/index.html ]
{% testtag %}

Output in browser is:

Testing!!!

If anyone has any pointers on a cleaner way to do this, let me know. Or
maybe this is the cleanest way?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss
-~----------~----~----~----~------~----~------~--~---

Reply via email to