Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/283.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
python social auth:使用GitHub用户名获取用户_Python_Django_Python Social Auth - Fatal编程技术网

python social auth:使用GitHub用户名获取用户

python social auth:使用GitHub用户名获取用户,python,django,python-social-auth,Python,Django,Python Social Auth,在我的一生中,我无法通过github用户名找到特定的用户 for i in UserSocialAuth.objects.filter(provider='github').all(): print(i) 我想找到具有特定GitHub用户名(而不是站点用户名)的用户,比如“DanielPBak”。我该怎么做 UserSocialAuth只能按提供程序和用户进行筛选,因此似乎不可能只使用filter()。但是,通过过滤的用户进行迭代似乎是不可能的,因为似乎不可能访问UserAuth用户名

在我的一生中,我无法通过github用户名找到特定的用户

for i in UserSocialAuth.objects.filter(provider='github').all():
    print(i)
我想找到具有特定GitHub用户名(而不是站点用户名)的用户,比如“DanielPBak”。我该怎么做

UserSocialAuth只能按提供程序和用户进行筛选,因此似乎不可能只使用filter()。但是,通过过滤的用户进行迭代似乎是不可能的,因为似乎不可能访问UserAuth用户名,而只能访问站点的用户名

for i in UserSocialAuth.objects.filter(provider='github').all():
    print(i)
如何获取UserSocialAuth用户名

dir(i)没有透露任何与auth用户名或github用户名有关的信息

for i in UserSocialAuth.objects.filter(provider='github').all():
    print(i)