Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy Django to Heroku - - configuring the database #69

Closed
enoren5 opened this issue Feb 11, 2021 · 1 comment
Closed

Deploy Django to Heroku - - configuring the database #69

enoren5 opened this issue Feb 11, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@enoren5
Copy link
Owner

enoren5 commented Feb 11, 2021

I’m trying to deploy my Django project to Heroku. I’m following along with the official Heroku doc titled, “Concurrency and Database Connections in Django”.

The Python module I am working with is dj_database_url which I have imported at the top of my settings.py. Near the bottom of the guide (above), they recommend using this line:

DATABASES['default'] = dj_database_url.config(conn_max_age=600, ssl_require=True)

That breaks my dev server (db.sqlite) locally resulting in this traceback: https://pastebin.com/uLZpA6R4

The project deployed on Heroku is broken with this traceback (postgres): https://pastebin.com/RSB8xc6M

dj_database_url needs to be properly configured to use sqlite locally (http://127.0.0.1:8000/) and postgres remotely (https://tarot-juicer-next-iter.herokuapp.com/).

What is wrong with line 102 in settings.py?

edit: grammar

@enoren5 enoren5 added the bug Something isn't working label Feb 11, 2021
This was referenced Feb 18, 2021
@enoren5
Copy link
Owner Author

enoren5 commented Feb 18, 2021

Resolved in PR #72

@enoren5 enoren5 closed this as completed Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant