简体   繁体   English

用于帐户注册和登录的Django allauth和rest框架

[英]Django allauth and rest framework for account signup and login

I need to make custom views for signup and login implementation on django rest framework for doing rest call. 我需要在django rest框架上为注册和登录实现创建自定义视图,以进行rest调用。 I have seen the sign-up view and login view provided by allauth which use loginForm and signupForm. 我已经看到了allauth提供的使用loginForm和signupForm的注册视图和登录视图。 But i do not know how to work them out with restframework for api calls. 但是我不知道如何使用restframework进行api调用。 Also i need csrf token security. 我也需要csrf令牌安全性。 Can anyone help me out with this? 谁能帮我这个忙吗?

Maybe this doc can help you: http://www.django-rest-framework.org/topics/html-and-forms/ 也许此文档可以为您提供帮助: http : //www.django-rest-framework.org/topics/html-and-forms/

It's a login form with DRF and csrf token :) 这是带有DRF和c​​srf令牌的登录表单:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM