I am totally new to hosting/deploying applications. After watching this video, he started a new database from scratch rather than converting his Django SQLite database. I have lots of data that I want on the deployed site so I'd like some advice as to how to do that with Django and Heroku. I have seen there are some SQLite -> PostGreSQL conversion questions on here but none seemed to show a step by step guide using Django and Heroku, only issues they're having. I just want to make sure I do it right.
1 Answer
One easy solution could be using dumpdata and loaddata management commands from Django.
For example, locally you would do:
$ python manage.py dumpdata > somefile
then on your deployment you could do:
$ python manage.py loaddata somefile
This is not the ideal solution, but for simple use cases could definitely do the trick.
Note: you would have to first upload the somefile to your server, in this case heroku.
dumpdataandloaddata, but you might run into issues. Also, see: docs.djangoproject.com/en/2.1/topics/serialization