Skip to content

Commit

Permalink
Arrange settings file
Browse files Browse the repository at this point in the history
  • Loading branch information
omarion3698 committed Nov 19, 2020
1 parent 19b9362 commit 650c8ee
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions DRESSUP/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,19 @@
import dj_database_url
from decouple import config,Csv

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

MODE=config("MODE", default="dev")

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = config('SECRET_KEY')

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = config('DEBUG', default=False, cast=bool)

ALLOWED_HOSTS = config('ALLOWED_HOSTS', cast=Csv())

# development
if config('MODE')=="dev":
DATABASES = {
Expand All @@ -30,19 +40,15 @@
db_from_env = dj_database_url.config(conn_max_age=500)
DATABASES['default'].update(db_from_env)

ALLOWED_HOSTS = config('ALLOWED_HOSTS', cast=Csv())
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


CORS_ORIGIN_WHITELIST = (
'http://localhost:4200',
'http://localhost:8080',
)

CORS_ORIGIN_ALLOW_ALL = True
# Application definition

# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
Expand Down

0 comments on commit 650c8ee

Please sign in to comment.