Why when i use sql files and load my initial data via sql statements and when deploying the app on heroku,the sql files aren’t executed and no data found in the database by default,and how to solve it ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Heroku does not use the SQLlite database. You have to use Heroku’s shared postgresql database since heroku is a ‘production’ environment.
When you push a django app up to heroku, it overrides your database settings in your settings.py file. You have to do a syncdb or south migration to your production postresql database your app now uses.
Btw – you will need to install postgres on your devel environment and pip install psycopg2 for postgres/python support.