Create a link to delete membership in web2py
Posted
by
user1741325
on Stack Overflow
See other posts from Stack Overflow
or by user1741325
Published on 2012-12-16T22:59:10Z
Indexed on
2012/12/16
23:03 UTC
Read the original article
Hit count: 196
web2py
I'm trying to do something really simple but it's taking me ages to figure out how to do it properly. I want to have a button that simply deletes a member from a group.
So in my view I have
<div id="del-role">{{=A('Delete Role',_class="btn btn-danger", callback=URL('test'),delete='#del-role')}}</div>
However, when I click the button, the only thing I get is a Javascript prompt asking whether I'm sure I want to delete the specified object, yes/no. That's fine but, what I'd really like to do is just auth.del_membership('role')
What needs to go in my controller? I do not want any page redirection, I just want to auth.del_membership(role) This seemingly simple thing is taking me forever to understand. Thanks!
© Stack Overflow or respective owner