I am having the same problem with a gae-boilerplate site.
ur_for is defined in basehandler.py as so...
def jinja2_factory(app):
j = jinja2.Jinja2(app)
j.environment.filters.update({
# Set filters.
# ...
})
j.environment.globals.update({
# Set global variables.
'csrf_token': generate_csrf_token,
'uri_for': webapp2.uri_for,
'getattr': getattr,
})
j.environment.tests.update({
# Set test.
# ...
})
return j
The error occurs randomly, but once it occurs the site is down for good.
Re-uploading to GAE fixes the problem temporarily.
On Sunday, January 12, 2014 2:30:25 AM UTC-8, Ronen Azachi wrote:
>
> hi
>
> having same problem. I am using the boilerplate "
> https://github.com/coto/gae-boilerplate"
>
> did you resolve this issue?
>
> On Monday, July 16, 2012 10:34:35 AM UTC+3, Thomas Marban wrote:
>>
>>
>> Ever since including webapp2.uri_for in my webapp2_extras.jinja2 config
>> via
>>
>> 'globals': {
>> 'uri_for' : webapp2.uri_for
>> },
>>
>> I'm getting an undefined error every time I change a python file and
>> load the app for the first time. It won't come up on subsequent requests.
>> Also tried to inject it into globals via a Jinja2 factory but same result.
>> Any hints?
>>
>> UndefinedError: 'uri_for' is undefined
>>
>>
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.