Facebook Login

Sell stuff to your audience: https://gumroad.com/

https://github.com/omab/django-social-auth

https://github.com/jonathanendersby/SocialAuthCustomUserModel

Trying to get this one working!

pip install django-social-auth

django-admin.py startapp accounts

Add to settings:

‘genomex.accounts’,
‘social_auth’,

add to middleware classes

‘social_auth.middleware.SocialAuthExceptionMiddleware’,

Add to settings

AUTHENTICATION_BACKENDS = (
    ‘social_auth.backends.google.GoogleOAuth2Backend’,
    ‘django.contrib.auth.backends.ModelBackend’,
)
LOGIN_URL = ‘/’
LOGIN_REDIRECT_URL = ‘/post’
LOGIN_ERROR_URL = ‘/error’
GOOGLE_OAUTH2_CLIENT_ID = ‘CLIENTIDCLIENTIDCLIENTIDCLIENTID’
GOOGLE_OAUTH2_CLIENT_SECRET = ‘CLIENTSECRETCLIENTSECRETCLIENTSECRET’
AUTH_USER_MODEL = ‘myapp.User’ # You do not need SOCIAL_AUTH_USER_MODEL

Go to google api to get an id

https://code.google.com/apis/console/?pli=1#project:804861904040:access

Call back www.genomex.org/post

Add keys

Fill Models and Views, templates

add urls.py

 url(r”, include(‘social_auth.urls’)),
    url(r’^$’, TemplateView.as_view(template_name=”pre.html”)),
    url(r’^post$’, TemplateView.as_view(template_name=”post.html”)),
    url(r’^error$’, TemplateView.as_view(template_name=”error.html”)),
./manage.py syncdb

migrate

Fix templateview

Deploy!

Setting up env in Webfaction

https://github.com/xenith/django-base-template

$ pip install -r requirements/local.txt
$ cp projectname/settings/local-dist.py projectname/settings/local.py
$ python manage.py syncdb
$ python manage.py migrate
$ python manage.py runserver

Edit http apache confg

edit wsgi.py

from site import addsitedir
addsitedir(‘/home/raony/.virtualenvs/cursoder/lib/python2.7/site-packages’)

sys.path.append(‘/home/raony/webapps/cursoder/rcourse’)

requirements/local

requirements/production

Set up Database

python manage.py sync

St up local.py

Redirect uri request

http://genomex.org/complete/google-oauth2/

Found this website a long time ago

http://learn.hackerearth.com/

https://github.com/pennersr/django-allauth

Categories: Sem categoria

Related Posts

Sem categoria

raid 0 vs raid 10

http://www.zdnet.com/blog/storage/raid-10-is-the-cadillac-of-raid/131 https://bitcointalk.org/index.php?topic=28411.0 http://www-03.ibm.com/systems/resources/Demartek_IBM_LSI_RAID_Controller_Performance_Evaluation_2009-10.pdf http://www.dell.com/downloads/global/products/pvaul/en/PERC6_PerfWP_WMD1120.pdf http://www.tomshardware.com/forum/245704-32-raid-raid http://www.dell.com/downloads/global/products/pvaul/en/PERC6_PerfWP_WMD1120.pdf RAID level Sequential Reads (MB/s) Sequential Writes (MB/s) Random Reads (IOPS) Random Writes (IOPS) RAID 0 Best Best Best Best RAID 10 Better Better Best Better http://louwrentius.com/benchmark-results-of-random-io-performance-of-different-raid-levels.html http://docs.oracle.com/cd/E19691-01/820-1847-20/appendixf.html#50515995_83606 https://www.kernel.org/doc/Documentation/filesystems/ext4.txt Read more…

Sem categoria

One Liners

https://blogs.oracle.com/ksplice/entry/the_top_10_tricks_of http://www.math.harvard.edu/computing/perl/oneliners.txt https://wiki.python.org/moin/Powerful%20Python%20One-Liners Related PostsZip each file separatelyraid 0 vs raid 10uau they release house of cards full season!  Can't wait to watch love!Report LGC

Sem categoria

Fixing sublime text 3 folder association in ubuntu 14.04

~/.local/share/applications/mimeapps.list change sublime to nautilus Related PostsBuild 3068 Release Date: 3 February 2015Mendeley sharing papers across computersMudando atalhos no Sublime Text 2Fixing Python 3.4 in Ubuntu Trusty 14.04Minitube on Ubuntu 12.04