mirror of
https://github.com/Crocmagnon/charasheet.git
synced 2024-11-05 06:13:55 +01:00
Add local IP to debug conf
This commit is contained in:
parent
d80172e96a
commit
093e0f2501
1 changed files with 12 additions and 4 deletions
|
@ -3,10 +3,6 @@ from pathlib import Path
|
|||
|
||||
import environ
|
||||
|
||||
INTERNAL_IPS = [
|
||||
"127.0.0.1",
|
||||
]
|
||||
|
||||
PROJECT_ROOT = Path(__file__).resolve().parent.parent.parent
|
||||
BASE_DIR = PROJECT_ROOT / "src"
|
||||
CONTRIB_DIR = PROJECT_ROOT / "contrib"
|
||||
|
@ -35,8 +31,20 @@ SECRET_KEY = env("SECRET_KEY")
|
|||
DEBUG = env("DEBUG")
|
||||
DEBUG_TOOLBAR = env("DEBUG") and env("DEBUG_TOOLBAR")
|
||||
|
||||
INTERNAL_IPS = [
|
||||
"127.0.0.1",
|
||||
]
|
||||
ALLOWED_HOSTS = env("ALLOWED_HOSTS")
|
||||
|
||||
if DEBUG:
|
||||
import socket
|
||||
|
||||
hostname = socket.gethostname()
|
||||
ip = socket.gethostbyname(hostname)
|
||||
INTERNAL_IPS.append(ip)
|
||||
ALLOWED_HOSTS.append(ip)
|
||||
|
||||
|
||||
# Application definition
|
||||
|
||||
DJANGO_APPS = [
|
||||
|
|
Loading…
Reference in a new issue