def allow_404(response): if response.status_code == 404: response.success()