问题
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