How to implement django-allauth in homepage as modal?

浪尽此生 提交于 2021-02-09 10:54:31

问题


There are few questions based on this idea like:

Implementing Ajax requests / response with django-allauth

Log in / Sign up directly on home page

https://www.reddit.com/r/django/comments/30lz11/django_allauth_implement_loginsignup_on_homepage/

but I need a little more help. I understand that I have to make form action url of modal as {% url 'account_login' %}. I have included {% load account %} and changed the 'name' and 'id' of username and password fields. My question is what other things I need to do to achieve this as it is still not working.


回答1:


I had the same question and I wrote little tutorial for 3 methods I found so far. You can find details at https://stackoverflow.com/a/39235634/4992248

P.S. If it was just one method, I would post it here, but because I do not know which one you would prefer, I simply give you a link.



来源:https://stackoverflow.com/questions/37661581/how-to-implement-django-allauth-in-homepage-as-modal

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!