>
> by the way as the request.vars.vars contains "<Storage {'eeee': '5555',
> 'www': '4'}>" ast.literal_eval(request.vars.vars[9:-1]) did the trick
>
Sorry, I was thinking dict instead of Storage.
> Just wondering if there is an easier way of doing it.... (I mean: to pass
> the current URL+vars to the LOAD)
>
How about:
{{=LOAD('default', 'send_suggestion',
vars=dict(url=URL(args=request.args, vars=request.get_vars)),
ajax_trap=True)}}
def send_suggestion():
import urllib
form = SQLFORM.factory(Field('message', 'text', requires=IS_NOT_EMPTY
()))
if form.process().accepted:
subject = 'FEEDBACK: %s' % urllib.unquote(request.get_vars.url)
response.flash = 'Thanks for your feedback'
Anthony