Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

In our Django project that we are testing via DO Apps. I followed along with this tutorial
and added this block of code.
DEVELOPMENT_MODE = os.getenv("DEVELOPMENT_MODE", "False") == "True"
if DEVELOPMENT_MODE is True:
DATABASES = {
"default": {
"ENGINE": "Our local database postgres creds",
"NAME": os.path.join(BASE_DIR, "postgres "),
}
}
elif len(sys.argv) > 0 and sys.argv[1] != 'collectstatic':
if os.getenv("DATABASE_URL", None) is None:
raise Exception("DATABASE_URL environment variable not defined")
DATABASES = {
"default": dj_database_url.parse(os.environ.get("DATABASE_URL")),
}
In our environment variable at the app, we have set the Debug mode to True and DEVELOPMENT_MODE is also True.
The issue is that every time we try to run the local server. We see a cookie that is creating a session and crashing the site. We have to delete that cookie to run the local env and I am suspecting that this is caused by this block of code that I mentioned above. Is my assumption is correct and how can I fix this?
Second, what is the best practice to add the env variable for the dev branch that can work locally and also on digital ocean apps? I am thinking that on my local machine
Debug == TRUE DEVELOPMENT_MODE == True
and the env variable at the DO app as.
Debug == False DEVELOPMENT_MODE == False
3775ce71211c40508f8e766a810eab
3775ce71211c40508f8e766a810eab
Lütfi Savaş
Cody Hendrix
Jadefvillanueva
kristosh
Manny2k0
aehsan4004
f25932a0b984430fb48c4256f1aaad
Raymond Abou
Hamza kholti
Charley Kiser