Tis gives us two options: fix the docs or change the code. I may be easier
to fix the code. How about we do:
@{join:1,2,3} we first parse as c = {'a':'join','b':'1,2,3') then we do
args = ast.literal_eval('(%s)' % c['b'] and then we call env[c['a']](*args)?
On Wednesday, 17 July 2013 06:47:07 UTC-5, Alan Etkin wrote:
>
> The correct syntax as far as the wiki is concerned is
>>
>> @{join:a,b,c}
>>
>> The problem is that MARKMIN identifies the call to "join" and the args
>> "a,b,c" but it does not parse the args. You will have to do that:
>>
>> def myjoin(vars):
>> items = vars.split(',')
>> if len(items)==3: return '-'.join(items)
>> return 'Error!'
>>
>> def index():
>> return auth.wiki(env=dict(join=myjoin)
>>
>
> Then the book example needs to be fixed because the arguments are not
> parsed by the custom join function.
>
> Also, it is confusing the use of the extra word in "... This calls the
> join function passed as extra with parameters ..." since there's an extra
> wiki argument used for additional markmin render functions (to process
> custom blocks), but that feature is not related to env.
>
>
--
---
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.