Handling errors when using custom forms with django-allauth -
i'm using django-allauth , custom login , signup forms in application. works until user submits error login or signup form. error shows on different page.
e.g intended login form @ uri: /payment/e886371a-fa52-4718-b8bc-e53fe8ac2bea/
however, when there form error in above page, redirects default login uri: /accounts/login/ , displays error there.
is there way make sure user returned original page incase of form error , have error(s) displayed there?
thanks in advance.
if have login form on uri /payment/e886371a-fa52-4718-b8bc-e53fe8ac2bea/ , not want redirect /account/login, not write action of form. , create payment view can handle authorization directly on payment uri.
<form class="login" method="post" action="/payment/e886371a-fa52-4718-b8bc-e53fe8ac2bea/"> ... </form>
in payment view can extends class allautho/accounts/views/loginview, handles normal email/password auth.
Comments
Post a Comment