Pregatire pentru productie si adaugare whitenoise
This commit is contained in:
@@ -24,9 +24,9 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
SECRET_KEY = "django-insecure-z(p$%wh6x^_9!1cgt%!s$w8k39(fox-^!iujxai42_wncja4%s"
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
DEBUG = False
|
||||
|
||||
ALLOWED_HOSTS = ["localhost", "127.0.0.1", "0.0.0.0"]
|
||||
ALLOWED_HOSTS = ["192.168.100.142", "eumi.local", "localhost", "127.0.0.1", "0.0.0.0"]
|
||||
|
||||
|
||||
# Application definition
|
||||
@@ -48,6 +48,7 @@ INSTALLED_APPS = [
|
||||
|
||||
MIDDLEWARE = [
|
||||
"django.middleware.security.SecurityMiddleware",
|
||||
"whitenoise.middleware.WhiteNoiseMiddleware",
|
||||
"django.contrib.sessions.middleware.SessionMiddleware",
|
||||
"django.middleware.common.CommonMiddleware",
|
||||
"django.middleware.csrf.CsrfViewMiddleware",
|
||||
@@ -128,9 +129,7 @@ USE_TZ = True
|
||||
# https://docs.djangoproject.com/en/6.1/howto/static-files/
|
||||
|
||||
STATIC_URL = "static/"
|
||||
STATICFILES_DIRS = [
|
||||
BASE_DIR / "static",
|
||||
]
|
||||
STATIC_ROOT = BASE_DIR / "staticfiles"
|
||||
|
||||
|
||||
# Email
|
||||
|
||||
Reference in New Issue
Block a user