Skip to content
Snippets Groups Projects

Merge feedingChickenWithChicken into main

13 files
+ 240
168
Compare changes
  • Side-by-side
  • Inline

Files

"""
Django settings for the_social_network project.
Generated by 'django-admin startproject' using Django 3.2.9.
Generated by 'django-admin startproject' using Django 3.1.2.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
import logging
import os
from pathlib import Path
@@ -16,18 +17,20 @@ from pathlib import Path
BASE_DIR = Path(__file__).resolve().parent.parent
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/
# See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-hpjug(8bb2&mx*lv-$h!a6ried17*-34or7ngwee*1x#f6kak^'
SECRET_KEY = os.environ.get("SECRET_KEY", "MySecretSecret")
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
DEBUG = os.environ.get("DEBUG", True)
ALLOWED_HOSTS = []
ALLOWED_HOSTS = os.environ.get("DJANGO_ALLOWED_HOSTS", "*").split(",")
# Application definition
CORS_ORIGIN_ALLOW_ALL = bool(os.environ.get("CORS_ORIGIN_ALLOW_ALL", True))
# CORS_ORIGIN_WHITELIST = os.environ.get("CORS_ORIGIN_WHITELIST", "*").split(",")
# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
@@ -74,7 +77,7 @@ TEMPLATES = [
WSGI_APPLICATION = 'the_social_network.wsgi.application'
# Database
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases
# https://docs.djangoproject.com/en/3.1/ref/settings/#databases
DATABASES = {
'default': {
@@ -84,7 +87,7 @@ DATABASES = {
}
# Password validation
# https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators
# https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
@@ -102,7 +105,7 @@ AUTH_PASSWORD_VALIDATORS = [
]
# Internationalization
# https://docs.djangoproject.com/en/3.2/topics/i18n/
# https://docs.djangoproject.com/en/3.1/topics/i18n/
LANGUAGE_CODE = 'en-us'
@@ -115,7 +118,7 @@ USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.2/howto/static-files/
# https://docs.djangoproject.com/en/3.1/howto/static-files/
STATIC_URL = '/django_static/'
STATIC_ROOT = os.path.join(BASE_DIR, "django_static/")
@@ -130,8 +133,3 @@ REST_FRAMEWORK = {
# Folder to store media data
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
# Default primary key field type
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
Loading