我怎样才能访问 "socialaccount-socialaccount" table
How can I access "socialaccount-socialaccount" table
如果我做错了,请原谅我的英语。我在我的 django 应用程序中使用 django-allauth 进行社交登录。 Django-allaouth 将人的信息数据保存在 "socialaccount-socialaccount" table 的 "extra-data" 属性中。这是 "extra-data" 属性。
{"timezone": 3, "first_name": "Kerim", "updated_time": "2016-04-18T13:03:38+0000", "name": "Kerim Fett", "gender": "male", "verified": false, "id": "141262349608745", "email": "kerim@yandex.com", "link": "https://www.facebook.com/app_scoped_user_id/", "last_name": "Fett", "locale": "tr_TR"}
我的问题是如何访问 views.py.
中的 "socialaccount-socialaccount" table 属性
extra_data
这里是字典。您只需使用 key
即可访问
>>extra_data['gender']
"male"
>>extra_data.get('gender', None)
"male"
如果我做错了,请原谅我的英语。我在我的 django 应用程序中使用 django-allauth 进行社交登录。 Django-allaouth 将人的信息数据保存在 "socialaccount-socialaccount" table 的 "extra-data" 属性中。这是 "extra-data" 属性。
{"timezone": 3, "first_name": "Kerim", "updated_time": "2016-04-18T13:03:38+0000", "name": "Kerim Fett", "gender": "male", "verified": false, "id": "141262349608745", "email": "kerim@yandex.com", "link": "https://www.facebook.com/app_scoped_user_id/", "last_name": "Fett", "locale": "tr_TR"}
我的问题是如何访问 views.py.
中的 "socialaccount-socialaccount" table 属性extra_data
这里是字典。您只需使用 key
>>extra_data['gender']
"male"
>>extra_data.get('gender', None)
"male"