python - Deploying Postgres database from my Windows machine on to my heroku django app -


Stuck on for a while ... I'm using Windows 7 x64, and I'm using my own In addition to the PostGrace database Postgres part, all parts of the heroku app are working fine to show in the DJOoOoo app. Since I'm on windows, foreman can not get it to set up my database properly (I also tried the desired and honcho, but everything has to say that fcntl can not be found which is a mac thing). .. So I think that I need to manually write in my settings in the DJ_database database. Hacok's guide asks to put something like this (but it does not work for me):

  import dj_database_url database ['default'] = dj_database_url.config ()   

According to dj_database_url, in .config () I can also provide postgres: // USER: PASSWORD @ HOST: PORT / NAME This information can fix my problem.

However, I only have this information:

  database = {'default': {'ENGINE': 'django.db.backends So I think I Should write: 

: 'NAME': 'coolname', 'USER': 'postgres', 'PASSWORD': 'pword'}}

P>

  import dj_database_url database ['default'] = dj_database_url.config (postgres: pword @ ??????: ?????? / coolname)  < / Pre> 

Should be my port of W hat and host ?? Am I doing the right thing here? Is my postgresql database an easy way to get to my halocus app? Thanks for the help! I have been trapped for T-T just two hours before this.

EDIT: I've found that Heroko gives me an EC2 example of postgraduate DB. I have plugged that information into dj_database_url.config () and now it works on Horoku, but when I try to exclude things locally (commenting on all the contents of each and matching the ec2 example After setting the database), I get 500 errors .... So now I'm stuck on this.

You can get your database credentials from Heroku dash board

1. With your dock dockboard.

2. Select your application, which you want to connect to

3. Add the database name you can search on.

4. Click the database link. You will get database credentials.

I hope this can help you. I have not used my live database in the local. This solution can help you if you have any problems please comment.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -