def disable_billing(request, username): user = get_object_or_404(User, username=username) if user == request.user or request.user.is_staff: api = PaymentAPI() api.disable_recurring(username) email.announce_billing_disable(user) return HttpResponseRedirect(reverse('member:profile:view', kwargs={'username': user.username}))
def disable_billing(request, username): user = get_object_or_404(User, username=username) if user == request.user or request.user.is_staff: api = PaymentAPI() api.disable_recurring(username) email.announce_billing_disable(user) return HttpResponseRedirect(reverse('member_profile', kwargs={'username': user.username}))