Try replacing

    template.register_template_library('template_extras')

with

    template.register_template_library('template_extras.extensions')

Check google/appengine/ext/webapp/template.py lines 162-194 for
details.

On Aug 31, 4:17 am, notreadbyhumans <[EMAIL PROTECTED]> wrote:
> I'm trying to extend the Google App Engine templates using the
> instructions in the post below (I have tried the instructions in this
> post and the one below):
>
> http://groups.google.com/group/google-appengine/browse_thread/thread/...
>
> However I can't seem to get it to take. I have created a folder in my
> app's directory called template_extras, which contains the __init__.py
> file and an extensions.py file containing the following:
>
> from google.appengine.ext.webapp import template
>
> register = template.create_template_register()
>
> @register.filter
>
> def ProcessThis(value):
>     return value
>
> Within my main.py I have the following:
>
> def get(self):
>
>    template.register_template_library('template_extras')
>
> The error I get with this configuration is:
>
> InvalidTemplateLibrary: Template library template_extras does not have
> a variable named 'register'
>
> Any ideas gratefully received!!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to