GithubHelp home page GithubHelp logo

Comments (8)

omab avatar omab commented on June 24, 2024

Have you tried running python manage.py syncdb in the sample app? There's a manager command defined for that, I've just tried it with sqlite and postgresql and it worked as expected.

from python-social-auth.

skakri avatar skakri commented on June 24, 2024

Yes I have. I'll clone python-social-auth repo and try to check if the problem persists (maybe there's a problem with my environment; I copied files by hand) and I'll get back to you.

from python-social-auth.

skakri avatar skakri commented on June 24, 2024

Ok, it's kinda weird, if you clone from git repo - it works, but if you copy files by hand - there's no relation.

Steps made (I'm on Arch, python by default is python 3, so I have to call python2.7)

git clone https://github.com/omab/python-social-auth.git python-social-auth-test
cd python-social-auth-test/
sudo python2.7 setup.py install
cd examples/flask_example
pip2 install -r requirements.txt # failed, couldn't install flask to system wide flask-packages
sudo pip2 install -r requirements.txt
sudo pip2 install psycopg2
python2.7 ./manage.py syncdb
python2.7 ./manage.py runserver

(afterwards tried with postgre)
^ runs ok!

mkdir flask_example
cd flask_example
virtualenv-2.7 --python=/usr/bin/python2.7 --no-site-packages virtualenv
. virtualenv/bin/activate
pip install python-social-auth
# copying files from https://github.com/omab/python-social-auth/tree/master/examples/flask_example ...
wget https://raw.github.com/omab/python-social-auth/master/examples/flask_example/__init__.py
wget https://raw.github.com/omab/python-social-auth/master/examples/flask_example/manage.py
wget https://raw.github.com/omab/python-social-auth/master/examples/flask_example/requirements.txt
wget https://raw.github.com/omab/python-social-auth/master/examples/flask_example/settings.py
mkdir models && cd models
wget https://raw.github.com/omab/python-social-auth/master/examples/flask_example/models/__init__.py
wget https://raw.github.com/omab/python-social-auth/master/examples/flask_example/models/user.py
cd ..
mkdir routes && cd routes
wget https://raw.github.com/omab/python-social-auth/master/examples/flask_example/routes/__init__.py
wget https://raw.github.com/omab/python-social-auth/master/examples/flask_example/routes/main.py
cd ..
mkdir templates && cd templates
wget https://raw.github.com/omab/python-social-auth/master/examples/flask_example/templates/base.html
wget https://raw.github.com/omab/python-social-auth/master/examples/flask_example/templates/done.html
wget https://raw.github.com/omab/python-social-auth/master/examples/flask_example/templates/home.html
cd ..

pip install -r requirements.txt
python ./manage.py migrate run
python ./manage.py runserver

On http://localhost:5000/complete/..

OperationalError: (OperationalError) no such table: social_auth_usersocialauth u'SELECT social_auth_usersocialauth.id AS social_auth_usersocialauth_id, social_auth_usersocialauth.provider AS social_auth_usersocialauth_provider, social_auth_usersocialauth.uid AS social_auth_usersocialauth_uid, social_auth_usersocialauth.extra_data AS social_auth_usersocialauth_extra_data, social_auth_usersocialauth.user_id AS social_auth_usersocialauth_user_id \nFROM social_auth_usersocialauth \nWHERE social_auth_usersocialauth.uid = ? AND social_auth_usersocialauth.provider = ?\n LIMIT ? OFFSET ?' ('14276842', 'twitter', 1, 0)

Maybe Python-Social-Auth package (via pip) differs from git and I've forgotten some step?

from python-social-auth.

omab avatar omab commented on June 24, 2024

pip package differs (I'm waiting to finish the tests to make a new release), don't run python manage.py migrate run, use python manage.py syncdb.

from python-social-auth.

skakri avatar skakri commented on June 24, 2024

Yeah but there's no syncdb command (in package which is provided via pip):

python ./manage.py syncdb
Command syncdb not found
  migrate    
  runserver  Runs the Flask development server i.e. app.run()
  shell      Runs a Python shell inside Flask application context.

So it's better to install via git for now (I'm not developing anything critical, I just want to keep up with the latest version, which works)? :)

from python-social-auth.

omab avatar omab commented on June 24, 2024

I've released v0.1.1 to pypi, could you try again?

from python-social-auth.

skakri avatar skakri commented on June 24, 2024

Great, it works now. Thank you!

from python-social-auth.

omab avatar omab commented on June 24, 2024

No problem, I'm closing the issue, reopen if needed.

from python-social-auth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.