def unitedit():
"""
edit a unit details
"""
unit = db.unit(request.args(0)) or redirect(URL('index'))
crud.settings.delete_next = URL('course', args=unit.course)
form = crud.update(db.unit,
unit.id, next=URL('unit',
args=
unit.id))
return dict(form=form)
If the user ticks the 'delete' box then submits the form, then they
are redirected to the 'unit' page, which drops them back to the index
page.
The code for the function 'crud.update' does not look at the variable
'crud.settings.delete_next' at all, as far as I can see.
I have found a solution, of sorts, which is to use the 'ondelete'
function to set a session variable with the 'courseid', which is then
checked by the 'unit' page which does an extra redirect to the course
page (after deleting the session variable).
Davo