0

I've been stuck on this part for a while.After completing all the other steps when I enter git push heroku master, it pushes all the files but how do I migrate my local database? There are no commands for that. My settings.py file is still pointing to the local postgres database.How do I migrate this data into the heroku database?

settings.py

 DATABASES = {
   'default': {
    'ENGINE': 'django.db.backends.postgresql_psycopg2',
    'NAME': 'music',                      
    'USER': '**',
    'PASSWORD': '**',
    'HOST': '127.0.0.1',
    'PORT': '5432',
   }
 }

1 Answer 1

0

Did you followed the heroku django tutorial. From the django-settings they are clearly mention how heroku will detect database url using dj-database-url package.

So just define this setting below your settings.py file then you are good to go.

For Importing and Exporting to heroku postgres please see this heroku-postgres-import-export

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.