From e7d3801ea4c48f80b6f639d92366a1a3ecaa66f4 Mon Sep 17 00:00:00 2001 From: virtimus Date: Sun, 6 Nov 2022 23:09:20 +0100 Subject: [PATCH 1/2] rr --- gettingstarted/settings.py | 16 ++++++++++------ hello/templates/base.html | 2 +- hello/templates/index.html | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/gettingstarted/settings.py b/gettingstarted/settings.py index b00430d2e..8bf5d0f53 100644 --- a/gettingstarted/settings.py +++ b/gettingstarted/settings.py @@ -91,12 +91,16 @@ MAX_CONN_AGE = 600 -DATABASES = { - "default": { - "ENGINE": "django.db.backends.sqlite3", - "NAME": os.path.join(BASE_DIR, "db.sqlite3") - } -} +import dj_database_url +DATABASES['default'] = dj_database_url.config(conn_max_age=600, ssl_require=True) + + +#DATABASES = { +# "default": { +# "ENGINE": "django.db.backends.sqlite3", +# "NAME": os.path.join(BASE_DIR, "db.sqlite3") +# } +#} if "DATABASE_URL" in os.environ: # Configure Django for DATABASE_URL environment variable. diff --git a/hello/templates/base.html b/hello/templates/base.html index 97ec07386..06de7e0d0 100644 --- a/hello/templates/base.html +++ b/hello/templates/base.html @@ -1,7 +1,7 @@ -Python Getting Started on Heroku +Python Getting Started on Heroku22 diff --git a/hello/templates/index.html b/hello/templates/index.html index 55951ccc2..a344f68f7 100644 --- a/hello/templates/index.html +++ b/hello/templates/index.html @@ -8,7 +8,7 @@ -

Getting Started with Python on Heroku

+

Getting Started with Python on Heroku22

This is a sample Python application deployed to Heroku. It's a reasonably simple app - but a good foundation for understanding how to get the most out of the Heroku platform.

Getting Started with Python Source on GitHub From c35bb679ac33e87534f5ab27c8a087089306846f Mon Sep 17 00:00:00 2001 From: virtimus Date: Sun, 6 Nov 2022 23:20:40 +0100 Subject: [PATCH 2/2] tt --- gettingstarted/settings.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/gettingstarted/settings.py b/gettingstarted/settings.py index 8bf5d0f53..61bd1b25f 100644 --- a/gettingstarted/settings.py +++ b/gettingstarted/settings.py @@ -92,15 +92,16 @@ MAX_CONN_AGE = 600 import dj_database_url -DATABASES['default'] = dj_database_url.config(conn_max_age=600, ssl_require=True) -#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") + } +} +DATABASES['default'] = dj_database_url.config(conn_max_age=600, ssl_require=True) if "DATABASE_URL" in os.environ: # Configure Django for DATABASE_URL environment variable.