After further experimentation, it seems the default is for the wiki page to get processed once when you submit it after editing. Further auth.wiki calls on that slug just retrieve the computed html, they do not do processing, hence the env argument is ignored. There is a force_render flag which would reprocess the wiki page, but of course that slows down page retrieval. Anyway, its working now and I wanted to let everyone know the answer.
On Tuesday, November 5, 2013 4:58:15 PM UTC-5, Chuck Paulson wrote: > > In a simple test app I have defined a controller, view, and wiki page. The > idea is that the controller decides which wiki page to display (ex. > 'slug'), and the view calls auth.wiki() to get the wiki page. The wiki page > contains @{mytest:hi} which should be processed by the auth.wiki() call > in the view. > > The problem is that the @{mytest:hi} line in the wiki page does not do > anything. It is as if the env argument to the auth.wiki() call in the view > is ignored. Could someone tell me why this is? Is there is a workaround? > Thanks. > > The controller: > > def test(): > return dict(myslug='slug') > > The view: > > {{extend 'layout.html'}} > <h1>This is the default/test.html template</h1> > {{=auth.wiki(myslug, env=dict(mytest=lambda x: "%s-%s" % (x,x)))}} > {{=BEAUTIFY(response._vars)}} > > The 'slug': > > ## Slug > @{mytest:hi} > [[NEWLINE]] > page content > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.