precomputing some static urls

16 views
Skip to first unread message

Robin B

unread,
Feb 15, 2009, 9:52:15 AM2/15/09
to glashammer
I switched to the stable versions and things are working well. I
wanted to precompute some static urls at init time as opposed to
request time, and I get this error:

url_for('home_vendor/index')
File "/Users/rcb/work/code/python/gae/devel/60-glasshammer/app/
glashammer/utils/local.py", line 15, in url_for
rv = local.url_adapter.build(endpoint, args,
File "/Users/rcb/work/code/python/gae/devel/60-glasshammer/app/
werkzeug/local.py", line 114, in __getattr__
raise AttributeError(name)
AttributeError: url_adapter

I think the problem is url_for() needs local which is not available
until request time. Is there some 'after-finalize' event that I
should hook into? Or is there a better way to do this?

Also is there a way to use werkzeug's "Submounts" in the routes?

Thanks,

Robin
Reply all
Reply to author
Forward
0 new messages