Skip to content

Commit

Permalink
update settings for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
szilvia-csernus committed Apr 9, 2024
1 parent dbd9804 commit 6837181
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions backend/rabbit_rescue_REST/settings_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from pathlib import Path
from dotenv import load_dotenv
import os
import dj_database_url

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
Expand All @@ -27,9 +26,9 @@
SECRET_KEY = os.getenv('SECRET_KEY')

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = "DEVELOPMENT" in os.environ
DEBUG = True

ALLOWED_HOSTS = [os.getenv("BACKEND_HOST"), "localhost", "127.0.0.1"]
ALLOWED_HOSTS = ["localhost", "127.0.0.1"]

# This is a list of origins that are authorized to make cross-origin requests.
# Cross-Origin Resource Sharing (CORS) is a mechanism that allows many
Expand Down Expand Up @@ -94,18 +93,14 @@
# Database
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases

if 'SQLITE3' in os.environ:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}

else:
DATABASES = {
'default': dj_database_url.parse(os.environ.get('DATABASE_URL', ''))
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}



# Password validation
Expand Down

0 comments on commit 6837181

Please sign in to comment.