2017-08-19 14:16:51 +00:00
|
|
|
from .base import *
|
|
|
|
|
|
|
|
# Quick-start development settings - unsuitable for production
|
2024-01-14 04:22:08 +00:00
|
|
|
# https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/
|
2017-08-19 14:16:51 +00:00
|
|
|
|
2022-02-22 16:31:02 +00:00
|
|
|
SECRET_KEY = os.environ.get("SECRET_KEY") or "DEVELOPMENT!!"
|
|
|
|
DEBUG = bool(strtobool(os.environ.get("DEBUG") or "True"))
|
2017-11-19 01:57:29 +00:00
|
|
|
|
2017-08-19 14:16:51 +00:00
|
|
|
|
2017-12-03 02:39:57 +00:00
|
|
|
# Static files (CSS, JavaScript, Images)
|
2024-01-14 04:22:08 +00:00
|
|
|
# https://docs.djangoproject.com/en/5.0/howto/static-files/
|
2019-07-11 02:26:10 +00:00
|
|
|
#
|
2024-01-14 04:22:08 +00:00
|
|
|
# Comment out STORAGES["staticfiles"]["BACKEND"] and uncomment DEBUG = False to
|
|
|
|
# test with production static files.
|
2017-12-03 02:39:57 +00:00
|
|
|
|
2019-07-11 02:26:10 +00:00
|
|
|
# DEBUG = False
|
2024-01-14 04:22:08 +00:00
|
|
|
STORAGES["staticfiles"][
|
|
|
|
"BACKEND"
|
|
|
|
] = "django.contrib.staticfiles.storage.StaticFilesStorage"
|
2017-12-03 02:39:57 +00:00
|
|
|
|
|
|
|
|
2024-02-06 05:02:44 +00:00
|
|
|
# Logging
|
|
|
|
# https://docs.djangoproject.com/en/5.0/ref/logging/
|
|
|
|
#
|
|
|
|
# Uncomment this LOGGING configuration for verbose logging even when DEBUG=False.
|
|
|
|
# Based on: https://stackoverflow.com/a/56456466
|
|
|
|
|
|
|
|
# LOGGING = {
|
|
|
|
# "version": 1,
|
|
|
|
# "disable_existing_loggers": False,
|
|
|
|
# "formatters": {
|
|
|
|
# "verbose": {
|
|
|
|
# "format": (
|
|
|
|
# "%(asctime)s [%(process)d] [%(levelname)s] "
|
|
|
|
# "pathname=%(pathname)s lineno=%(lineno)s "
|
|
|
|
# "funcname=%(funcName)s %(message)s"
|
|
|
|
# ),
|
|
|
|
# "datefmt": "%Y-%m-%d %H:%M:%S",
|
|
|
|
# },
|
|
|
|
# },
|
|
|
|
# "handlers": {
|
|
|
|
# "console": {
|
|
|
|
# "level": "INFO",
|
|
|
|
# "class": "logging.StreamHandler",
|
|
|
|
# "formatter": "verbose",
|
|
|
|
# },
|
|
|
|
# },
|
|
|
|
# "loggers": {
|
|
|
|
# "django": {
|
|
|
|
# "handlers": ["console"],
|
|
|
|
# "level": "DEBUG",
|
|
|
|
# "propagate": True,
|
|
|
|
# },
|
|
|
|
# "django.server": {
|
|
|
|
# "handlers": ["console"],
|
|
|
|
# "level": "DEBUG",
|
|
|
|
# "propagate": False,
|
|
|
|
# },
|
|
|
|
# },
|
|
|
|
# }
|
|
|
|
|
|
|
|
|
2017-08-20 17:31:19 +00:00
|
|
|
# Django Rest Framework
|
2020-01-19 16:49:45 +00:00
|
|
|
# https://www.django-rest-framework.org/
|
2017-08-20 17:31:19 +00:00
|
|
|
|
2022-02-10 00:00:30 +00:00
|
|
|
REST_FRAMEWORK["DEFAULT_RENDERER_CLASSES"] = (
|
|
|
|
"rest_framework.renderers.JSONRenderer",
|
|
|
|
"rest_framework.renderers.BrowsableAPIRenderer",
|
2017-08-20 17:31:19 +00:00
|
|
|
)
|