>
> VIEW THAT CAPTURES CURRENT PAGE VARS
>
> {{import json}} <-- side question: Why "import json" only works in
> view and not controller?
>
Not sure what you mean. The json module is part of the standard library and
can be imported from anywhere.
> {{=A('Add this page or manage bookmarks', _href=URL('default',
> 'manage_menu_favorites', vars=dict(specificURL = request.url,
> saved_menu_vars = json.dumps(request.get_vars))), _class='btn btn-warning
> btn-lg',
> _style='font-size:120%;float:left;padding:10px;margin:10px;text-transform:
> capitalize;')}}
>
At this point, what exactly is in request.get_vars (note, request.get_vars
contains the variables in the query string of the URL, so this would be the
query string of the current page)? Why do you want users to go to a new
page whose URL includes a JSON representation of the query string from the
previous page?
If users have a set of saved bookmarks, it does not make sense to keep all
the bookmarks in the query string of the URL (i.e., request.get_vars). It
makes more sense to store the bookmarks in the db and load them into the
session as needed.
Anthony
--
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/d/optout.