簡體   English   中英

在沒有社交后端的情況下在Python-Social-Auth上注冊新用戶的最佳方法是什么?

[英]What's the best way to register a new user on Python-Social-Auth without a social backend?

我知道這聽起來有點混亂,但有些網站允許多種方式進行注冊,比如使用社交網絡(FB或TW,當然我正在使用python-social-auth這個porpouse)或使用表單來創建一個新用戶......

有沒有辦法使用自定義注冊表單(即使用一組常用的字段,如電子郵件,密碼,名字等)將新用戶注冊到我的網站,並將其與python-social-auth集成?

謝謝。

您可以隨時注冊新用戶

from django.contrib.auth.models import User

user = User.objects.create_user(username='new_user',
                                email='test@dot.com',
                                password='test')

然后添加他的社交帳戶。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM