def created(form):
#my code
redirect('blah-blah')
should be
def created(form):
#my code
redirect(URL('blah-blah'))
else the url is relative to the gird action path and probably invalid
because not signed.
On Saturday, 19 October 2013 03:39:27 UTC-5, Vladimir Bratov wrote:
>
> Hi
> I am using smartgrid:
>
> def index():
> grid = SQLFORM.smartgrid(db.spall, create=True, editable=False,
> csv=False, search_widget=False, oncreate=created)
> return dict(grid=grid)
>
> When a new record is created created() function is called:
>
> def created(form):
> #my code
> redirect('blah-blah')
>
> #my code is executed and working as it should, but redirect is completely
> ignored - I always get back to 'index' without args after new record
> creation.
>
> How to redirect to another page when a new record is created?
>
>
>
--
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.