简体   繁体   中英

Django Heroku webapp completing PythonOAuth leads to 500 error

I'm running a webapp on heroku, and when I try and log in using Python Social OAuth through google+ I get a Server Error (500).

The default url is https://kloudtransfer.herokuapp.com/ and when I try and complete the authentication I am lead to kloudtransfer.herokuapp.com/complete/google-plus/ .

I'm supposed to be led to kloudtransfer.herokuapp.com/members , as is listed in my site.py. My repo is here: https://github.com/lilshim/kloudtransfer

Here is the heroku logs for the 500 error:

2015-01-08T00:27:00.254253+00:00 heroku[router]: at=info method=POST path="/complete/google-plus/" host=kloudtransfer.herokuapp.com request_id=fdda7448-4fca-4987-8d5f-acddbd993b70 fwd="76.219.245.151" dyno=web.1 connect=1ms service=473ms status=500 bytes=253

Solved it!

I first set up error handling, and then took a lot at the traceback sent to my email, then saw that it was a database error: OperationalError: no such table: social_auth_usersocialauth. So, I looked into my prod server and saw that I never set up my databases. I set up an external db using heroku postgres and made the migrations etc etc. and now it's up! yay

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM