示例#1
0
文件: views.py 项目: feroda/JAGOM
def delete_member(request, group_slug, member_id):
    projectmember = get_object_or_404(ProjectMember, pk=member_id)
    projectmember.delete()
    messages.add_message(request, messages.SUCCESS,
        ugettext("Member %(user)s has been removed from project %(project_name)s deleted.") % {
            "user": projectmember.user,
            "project_name": projectmember.project.name,
        }
    )
    #TODO: issue a signal
    update_members_list(sender=None, instance=projectmember.project)

    return HttpResponse("OK")
示例#2
0
文件: forms.py 项目: feroda/JAGOM
 def save(self, *args, **kw):
     rv = super(MyAddUserForm, self).save(*args, **kw)
     update_members_list(sender=None, instance=self.project)
     return rv