Skip to content

Commit

Permalink
Hide secret_key & fix some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Bashmdz committed Apr 3, 2024
1 parent e358783 commit 792f007
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DATABASE_URL=postgres://bvrgtfij:[email protected]/bvrgtfij
11 changes: 6 additions & 5 deletions restaurant_booking_system/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-lo_ku^_ng8lfke_0w$$nf4l3mr$$whtp#@+8$-y!jvuc&r-0ii'
SECRET_KEY = os.getenv('SECRET_KEY')

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
DEBUG = True

ALLOWED_HOSTS = ['8000-bashmdz-restaurantbooki-p2d7q6lyrga.ws-us107.gitpod.io','.herokuapp.com'
ALLOWED_HOSTS = ['8000-bashmdz-houseofdamascus-neozn7p2zte.ws-us110.gitpod.io','.herokuapp.com'
]


Expand Down Expand Up @@ -94,15 +94,16 @@
# Database
# https://docs.djangoproject.com/en/4.2/ref/settings/#databases

DATABASE_URL = os.getenv('DATABASE_URL')
DATABASES = {
'default': dj_database_url.parse(os.environ.get("DATABASE_URL"))
'default': dj_database_url.parse(DATABASE_URL),
}

if 'test' in sys.argv:
DATABASES['default']['ENGINE'] = 'django.db.backends.sqlite3'

CSRF_TRUSTED_ORIGINS = [
"https://8000-bashmdz-restaurantbooki-p2d7q6lyrga.ws-us107.gitpod.io",
"https://8000-bashmdz-houseofdamascus-neozn7p2zte.ws-us110.gitpod.io",
"https://my-restaurant-booking-system-38d3a97041b0.herokuapp.com"
]

Expand Down

0 comments on commit 792f007

Please sign in to comment.