Re: [web2py] Change redirect if Delete is checked on update form

2012-03-03 Thread Bruno Rocha
if form.process().accepted: if request.vars.delete: redirect(URL('index')) On Sat, Mar 3, 2012 at 4:41 AM, HittingSmoke wrote: > I created a very simple blog and when done editing a post, I am > redirected to the updated post. > > This works great unless I'm deleting a post, in which

[web2py] Change redirect if Delete is checked on update form

2012-03-02 Thread HittingSmoke
I created a very simple blog and when done editing a post, I am redirected to the updated post. This works great unless I'm deleting a post, in which case it spits out an error because the post no longer exists. How can I tell my controller to check the status of the deleted checkbox before submi