38 lines
1 KiB
Python
38 lines
1 KiB
Python
from pathlib import Path
|
|
|
|
from config import DEBUG # noqa: F401
|
|
from config import tCOMMON_TOKEN as SECRET_KEY # noqa: F401
|
|
|
|
BASE_DIR = Path(__file__).resolve().parent.parent
|
|
|
|
VERSION = (0, 2, 0)
|
|
STATIC_DIR = BASE_DIR / "tcommon/static"
|
|
ALLOWED_HOSTS = ["*"]
|
|
|
|
INSTALLED_APPS = [
|
|
"django.contrib.auth",
|
|
"django.contrib.contenttypes",
|
|
"django.contrib.sessions",
|
|
"django.contrib.messages",
|
|
"corsheaders"
|
|
]
|
|
|
|
MIDDLEWARE = [
|
|
"corsheaders.middleware.CorsMiddleware",
|
|
"django.middleware.security.SecurityMiddleware",
|
|
"django.contrib.sessions.middleware.SessionMiddleware",
|
|
"django.middleware.common.CommonMiddleware",
|
|
"django.middleware.csrf.CsrfViewMiddleware",
|
|
"django.contrib.auth.middleware.AuthenticationMiddleware",
|
|
"django.contrib.messages.middleware.MessageMiddleware"
|
|
]
|
|
|
|
ROOT_URLCONF = "tcommon.urls"
|
|
WSGI_APPLICATION = "tcommon.wsgi.application"
|
|
LANGUAGE_CODE = "en-us"
|
|
TIME_ZONE = "UTC"
|
|
USE_I18N = True
|
|
USE_TZ = True
|
|
|
|
CORS_ALLOW_ALL_ORIGINS = True
|
|
CORS_URLS_REGEX = r"^/(static|favicon)/.+$"
|