From 753537977f169d273e39d58c82c743451be497a2 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Sun, 7 Jul 2024 13:29:26 +0300 Subject: [PATCH] Update development.py --- .../server/settings/environments/development.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.project_name}}/server/settings/environments/development.py b/{{cookiecutter.project_name}}/server/settings/environments/development.py index 6e00014e..3d63bbe7 100644 --- a/{{cookiecutter.project_name}}/server/settings/environments/development.py +++ b/{{cookiecutter.project_name}}/server/settings/environments/development.py @@ -4,6 +4,8 @@ SECURITY WARNING: don't run with debug turned on in production! """ +from __future__ import annotations + import logging import socket from typing import TYPE_CHECKING @@ -84,7 +86,7 @@ INTERNAL_IPS += ['127.0.0.1', '10.0.2.2'] -def _custom_show_toolbar(request: 'HttpRequest') -> bool: +def _custom_show_toolbar(request: HttpRequest) -> bool: """Only show the debug toolbar to users with the superuser flag.""" return DEBUG and request.user.is_superuser