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")
def save(self, *args, **kw): rv = super(MyAddUserForm, self).save(*args, **kw) update_members_list(sender=None, instance=self.project) return rv