Skip to content

Commit

Permalink
Update development.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn authored Jul 7, 2024
1 parent d6e5e35 commit 7535379
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 7535379

Please sign in to comment.