Commit 6510ce13 authored by Marc Duez's avatar Marc Duez

server : redirect to the patient page after creation / redirect to patient...

server : redirect to the patient page after creation / redirect to patient list after patient deletion
parent 8f2a6f00
......@@ -68,7 +68,8 @@ def add_form():
auth.add_permission(user_group, 'admin', db.patient, id)
res = {"redirect": "patient/index",
res = {"redirect": "patient/info",
"args" : { "id" : id },
"message": "new patient added"}
return gluon.contrib.simplejson.dumps(res, separators=(',',':'))
......@@ -171,7 +172,8 @@ def delete():
#delete patient
db(db.patient.id == request.vars["id"]).delete()
res = {"success": "true" }
res = {"redirect": "patient/index",
"success": "true" }
return gluon.contrib.simplejson.dumps(res, separators=(',',':'))
def permission():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment