def _project_cancel_member(request, memb_id): try: cancel_membership(memb_id, request.user) m = _(astakos_messages.USER_REQUEST_CANCELLED) messages.success(request, m) except ProjectError as e: messages.error(request, e)
def _project_cancel(request, chain_id): try: chain_id = int(chain_id) cancel_membership(chain_id, request.user) m = _(astakos_messages.USER_REQUEST_CANCELLED) messages.success(request, m) except (IOError, PermissionDenied), e: messages.error(request, e)
def project_cancel_join(request, project_uuid): project = get_object_or_404(Project, uuid=project_uuid) with ExceptionHandler(request): with transaction.atomic(): project = get_object_or_404(Project, uuid=project_uuid) memb_id = request.user.get_membership(project).pk cancel_membership(memb_id, request.user) m = _(astakos_messages.USER_REQUEST_CANCELLED) messages.success(request, m) return redirect_to_next(request, 'project_detail', args=(project.uuid, ))
def project_cancel_join(request, project_uuid): project = get_object_or_404(Project, uuid=project_uuid) with ExceptionHandler(request): with transaction.commit_on_success(): project = get_object_or_404(Project, uuid=project_uuid) memb_id = request.user.get_membership(project).pk cancel_membership(memb_id, request.user) m = _(astakos_messages.USER_REQUEST_CANCELLED) messages.success(request, m) return redirect_to_next(request, 'project_detail', args=(project.uuid,))