def close_account(request): anonymize_user(request.user) # Log the user out auth.logout(request) return render(request, "users/close_account.html")
def process_event_delete_user(event_id): event = AccountEvent.objects.get(id=event_id) anonymize_user(event.profile.user) event.status = AccountEvent.PROCESSED event.save()