Skip to content

Commit

Permalink
*
Browse files Browse the repository at this point in the history
  • Loading branch information
s3bu7i committed Feb 17, 2024
1 parent f25e99f commit baa0da8
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 12 deletions.
Binary file modified db.sqlite3
Binary file not shown.
Binary file modified demo/__pycache__/settings.cpython-312.pyc
Binary file not shown.
28 changes: 21 additions & 7 deletions demo/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
ENVIRONMENT = os.getenv('ENVIRONMENT', 'development')


DEBUG = False
# ALLOWED_HOSTS = []
ALLOWED_HOSTS = ['.vercel.app']
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
DEBUG = True
ALLOWED_HOSTS = []
# ALLOWED_HOSTS = ['.vercel.app']
# DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = '-05sgp9!deq=q1nltm@^^2cc+v29i(tyybv3v2t77qi66czazj'
Expand Down Expand Up @@ -79,13 +79,27 @@
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media_root')

# DATABASES = {
# "default": {
# "ENGINE": "django.db.backends.sqlite3",
# "NAME": os.path.join(BASE_DIR, 'db.sqlite3')
# }
# }
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": os.path.join(BASE_DIR, 'db.sqlite3')
'default': {
'ENGINE':os.getenv( 'django.db.backends.postgresql'),
'URL':os.getenv('postgresql://postgres:2bggBDgGec5CDeDf*dg54ca53ad1AeEa@viaduct.proxy.rlwy.net:27664/railway'),
'NAME':os.getenv('railway'),
'USER':os.getenv('postgres'),
'PASSWORD':os.getenv('2bggBDgGec5CDeDf*dg54ca53ad1AeEa'),
'HOST':os.getenv('viaduct.proxy.rlwy.net'),
'PORT':os.getenv(27664),
}

}



if ENVIRONMENT == 'production':
DEBUG = True
SECRET_KEY = os.getenv('SECRET_KEY')
Expand Down
6 changes: 1 addition & 5 deletions demo/wsgi.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import os

from django.core.wsgi import get_wsgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'demo.settings')

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "demo.settings")
application = get_wsgi_application()
app = application

Empty file removed py
Empty file.
Binary file modified requirements.txt
Binary file not shown.
14 changes: 14 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"builds": [
{
"src": "demo/wsgi.py",
"use": "@vercel/python"
}
],
"routes": [
{
"src": "/(.*)",
"dest": "demo/wsgi.py"
}
]
}

0 comments on commit baa0da8

Please sign in to comment.