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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.