django-socialauth

error when trying to connect to twitter with django social auth

陌路散爱 提交于 2019-12-12 00:43:24
问题 ImportError at /complete/twitter/ No module named social.pipeline i had this error when i was trying to connect twitter to my project this is the full traceback any body has any idea how to solve it Environment: Request Method: GET Request URL: http://127.0.0.1:8000/complete/twitter/? oauth_token=gqaWZAszthiQJEUaZHF72U1y7hGimCLGSGxr6YLUU&oauth_verifier=YAkKy9Q71YrScl1psUXBApx XeQITAcDm6ObCoxdjc Django Version: 1.5 Python Version: 2.7.3 Installed Applications: ('django.contrib.auth', 'django

javascript on click change href and open in new window

蓝咒 提交于 2019-12-11 16:48:47
问题 I have a Django project that offers its users the possibility to associate a user account to some social networks accounts like Twitter and Facebook. This works with Django Social Auth which basically provides a tag to know if the current user has already associated accounts or not. It allows the following code to display URLs accordingly: <fieldset id="social_associations" class=""> <legend>Social Associations</legend> {% for key, value in social_auth.items %} <img src="/static/img/{{ key }}

Twitter takes users to /en/logged-in/ regardless of my settings

自古美人都是妖i 提交于 2019-12-11 05:02:29
问题 I'm new to django-social-auth (please be gentle). I've followed the directions pretty faithfully from here: https://github.com/omab/django-social-auth/blob/master/README.rst And, when setting up my Twitter API account, I've told Twitter that the redirect should be http://mysite.com/auth/logged-in/ Yet, when a user attempts to log-in with Twitter, they're taken to the Twitter Auth page and once the say Yes (or whatever), Twitter returns them to http://mysite.com/ en /auth/logged-in/ In my

Custom users with django allauth

[亡魂溺海] 提交于 2019-12-11 00:04:26
问题 I am trying to use a custom user with django-allauth/social auth In settings.py, I have AUTHENTICATION_BACKENDS = ( # Needed to login by username in Django admin, regardless of `allauth` "django.contrib.auth.backends.ModelBackend", # `allauth` specific authentication methods, such as login by e-mail "allauth.account.auth_backends.AuthenticationBackend", ) SOCIALACCOUNT_PROVIDERS = \ {'facebook': {'SCOPE': ['email', 'user_likes', 'user_status', 'user_about_me', 'basic_info', 'read_stream'],

Django model not saving when calling save()

99封情书 提交于 2019-12-10 17:56:48
问题 so i am trying to save a django model, and for some reason i am only getting a 500 internal server error. the thing is, if i comment the social_auth.save() it works and i can manipulate the object, but not save it why is this happening? i am using django tastypie and i am trying to save a django-social-auth instance. def obj_create(self, bundle, request=None, **kwargs): try: #this is not supposed to upgrade password bundle = super(UserResource, self).obj_create(bundle) bundle.obj.save() if

python-social-auth custom redirect url in Django

走远了吗. 提交于 2019-12-10 16:54:19
问题 I am using python-social-auth package along with Django to manage oauth and openID logins. Now the issue is that, I can specify one redirect url in django settings.py , but in some case I want the user to be redirected to the same page from which he initiated the authentication process. E.g: if my redirect url is : /home/ and I am currently in a page /products/product1 from which I authenticate the user, then I want the user to be redirected to /products/product1/ rather than /home/ Please

Django Social Auth:Get email from linkedin,twitter & facebook

微笑、不失礼 提交于 2019-12-10 16:44:31
问题 I'm using Django social_auth api for login via social account. Here I want to get email address from social account and stored it in my database table. The first-name and last-name can be retrieved from the account but I can't retrieved email address, profile picture. Please share your ideas for retrieving those details from social account. 回答1: Twitter doesn't disclose emails, to retrieve Facebook email you need to define FACEBOOK_EXTENDED_PERMISSIONS = ['email'] , LinkedIn email is

Check if current user is logged in using any django social auth provider

此生再无相见时 提交于 2019-12-10 04:57:43
问题 I would like to check if a user is logged in via social authentication or using the django default authentication. something like if user.social_auth = true? 回答1: Ok after doing some research i came up with this solution to make sure if a user is authenticated using any social provider or just the default django auth. Check here for moreinfo.. {% if user.is_authenticated and not backends.associated %} #Do or show something if user is not authenticated with social provider but default auth {%

How can i get a specific provider from Django social-auth in a template?

隐身守侯 提交于 2019-12-08 02:11:39
问题 After installing and setting up social-auth i'm playing around a bit, trying to get the hang of it. I have read the docs, and have used the example project to get it running. But until now i have no idea how to get information on a certain provider. In the example project the templatetags are always used this way: {% for type, accounts in social_auth.associated.items %} {% for account in accounts %} {{account.provider}} is connected. {% endfor %} {% endfor %} What i want to do now is not list

A simple and up-to-date way to implement Facebook login in a Django app

老子叫甜甜 提交于 2019-12-07 23:11:48
问题 This issue is very common in stackoverflow, and there's a lot of different questions and answers about it, yet I couldn't find exactly what I need. First, I'd like to define exactly what I need: the option to let users log in to my app using their Facebook credentials. The app will save a matching classic Django user. I will only need to use the user's profile picture and to make sure that each time the same Facebook user will be related to the matching Django user. Unfortunately, I find it