mirror of
https://github.com/more-tech4-magnum-opus/backend.git
synced 2024-11-25 04:33:44 +03:00
62 lines
2.0 KiB
Python
62 lines
2.0 KiB
Python
from datetime import timedelta
|
|
|
|
from .base import *
|
|
from .base import env
|
|
|
|
# GENERAL
|
|
# ------------------------------------------------------------------------------
|
|
# https://docs.djangoproject.com/en/dev/ref/settings/#debug
|
|
DEBUG = True
|
|
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
|
|
SECRET_KEY = env(
|
|
"DJANGO_SECRET_KEY",
|
|
default="7IFkV9gOD8gP3RbPfBuFmcUE4rPVvlnTlVScHr8OBCmHQrA1OIl2la2TJqKIBkTu",
|
|
)
|
|
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
|
|
ALLOWED_HOSTS = ["*"]
|
|
|
|
# CACHES
|
|
# ------------------------------------------------------------------------------
|
|
# https://docs.djangoproject.com/en/dev/ref/settings/#caches
|
|
CACHES = {
|
|
"default": {
|
|
"BACKEND": "django.core.cache.backends.locmem.LocMemCache",
|
|
"LOCATION": "",
|
|
}
|
|
}
|
|
|
|
# https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#internal-ips
|
|
INTERNAL_IPS = ["127.0.0.1"]
|
|
|
|
# DRF
|
|
# ------------------------------------------------------------------------------
|
|
SIMPLE_JWT = {
|
|
"ACCESS_TOKEN_LIFETIME": timedelta(minutes=10000),
|
|
}
|
|
|
|
REST_FRAMEWORK = {
|
|
"DEFAULT_AUTHENTICATION_CLASSES": (
|
|
"rest_framework_simplejwt.authentication.JWTAuthentication",
|
|
),
|
|
"DEFAULT_PERMISSION_CLASSES": ("rest_framework.permissions.AllowAny",),
|
|
}
|
|
|
|
# STATIC
|
|
# ------------------------------------------------------------------------------
|
|
# https://docs.djangoproject.com/en/dev/ref/settings/#static-root
|
|
STATIC_ROOT = str(ROOT_DIR / "static")
|
|
# https://docs.djangoproject.com/en/dev/ref/settings/#static-url
|
|
STATIC_URL = "/static/"
|
|
# https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders
|
|
STATICFILES_FINDERS = [
|
|
"django.contrib.staticfiles.finders.FileSystemFinder",
|
|
"django.contrib.staticfiles.finders.AppDirectoriesFinder",
|
|
]
|
|
|
|
# MEDIA
|
|
# ------------------------------------------------------------------------------
|
|
# https://docs.djangoproject.com/en/dev/ref/settings/#media-root
|
|
MEDIA_ROOT = str(ROOT_DIR / "media")
|
|
# https://docs.djangoproject.com/en/dev/ref/settings/#media-url
|
|
MEDIA_URL = "/media/"
|