34👍
✅
As Heroku’s dynos don’t have a filesystem that persists across deploys, a file-based database like SQLite3 isn’t going to be suitable. It’s a great DB for development/quick prototypes, though.
Heroku do have a Postgres offering however that will suit – with a free tier and a basic $9/month tier that are good for hobby/small projects. The biggest benefit over SQLite is that you get backups that you wouldn’t get otherwise (plus all the other Postgres features).
There’s a guide to updating your settings.py
to use Postgres here: https://devcenter.heroku.com/articles/getting-started-with-django#django-settings
4👍
Heroku has a detailed article explaining "Why is SQLite a bad fit for running on Heroku"
https://devcenter.heroku.com/articles/sqlite3
- [Django]-How can I use relative path to read local files in Django app?
- [Django]-How do I restrict foreign keys choices to related objects only in django
- [Django]-How to use django 3.0 ORM in a Jupyter Notebook without triggering the async context check?
Source:stackexchange.com