Why the redirection is not working?

def mostra_evento():
    evento_id=request.args(0)
    query = (db.evento.id == evento_id)
    
db.evento.inizio.writable=db.evento.fine.writable=db.evento.risorsa.writable=db.evento.docente.writable=db.evento.materia.writable=False
    db.evento.colore.readable=db.evento.colore.writable=False
    
    # recupero la sede dell'evento
    sede_evento = db(db.risorsa.id == 
db.evento.risorsa).select().first().risorsa.sede
    
    exportcls = dict(csv_with_hidden_cols=False, html=False, json=False, 
tsv_with_hidden_cols=False, tsv=False)
    callback = lambda *args: redirect(URL('default', 'index'))
    form = SQLFORM.grid(query, args=[evento_id], 
fields=[db.evento.titolo,db.evento.inizio,db.evento.fine,db.evento.risorsa,db.evento.docente,db.evento.studenti],create=False,
 
details=True, editable=True, deletable=True, maxtextlength=60, 
exportclasses = exportcls, ondelete=callback)
    return dict(form=form)


...and moreover the record isn't deleted!
For the true I'd like to redirect not on index but in "sched" wirh 
args=sede_evento

How todo?
Thanks

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to