You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the beginnings of a project utilizing django-allauth and django-allauth-ui setup. I have made no modifications to either django-allauth or django-allauth-ui, nor overridden any templates or project files. They're both stock and as-is. When launching my project to test out basic account functionality, I noticed that nothing happens when I log in as a user and go to add an email address for the first time. I set a breakpoint in the allauth email management view to discover the cause, and it appears to be right here:
# allauth.account.views
...
classEmailView(AjaxCapableProcessFormViewMixin, FormView):
...
defpost(self, request, *args, **kwargs):
res=Noneif"action_add"inrequest.POST: # <- problem is here: 'action_add' is not in the POST datares=super(EmailView, self).post(request, *args, **kwargs)
elifrequest.POST.get("email"): # <- so it goes to thisif"action_send"inrequest.POST:
res=self._action_send(request)
elif"action_remove"inrequest.POST:
res=self._action_remove(request)
elif"action_primary"inrequest.POST:
res=self._action_primary(request)
res=resorHttpResponseRedirect(self.get_success_url()) # <- but none of the checks above pass, so this line is executed w/ res being a redirect# Given that we bypassed AjaxCapableProcessFormViewMixin,# we'll have to call invoke it manually...res=_ajax_response(request, res, data=self._get_ajax_data_if())
else:
# No email address selectedres=HttpResponseRedirect(self.success_url)
res=_ajax_response(request, res, data=self._get_ajax_data_if())
returnres
...
It appears, when submitting the form to add a new email address, that a required POST field is missing. and it reverts to the default behavior of redirecting to the success url. I would suspect that this behavior is not intended, as the way it stands currently is that it is impossible to add new email addresses. I believe a hidden form field is missing which adds the key being checked for to the POST data.
The text was updated successfully, but these errors were encountered:
I have the beginnings of a project utilizing django-allauth and django-allauth-ui setup. I have made no modifications to either django-allauth or django-allauth-ui, nor overridden any templates or project files. They're both stock and as-is. When launching my project to test out basic account functionality, I noticed that nothing happens when I log in as a user and go to add an email address for the first time. I set a breakpoint in the allauth email management view to discover the cause, and it appears to be right here:
It appears, when submitting the form to add a new email address, that a required POST field is missing. and it reverts to the default behavior of redirecting to the success url. I would suspect that this behavior is not intended, as the way it stands currently is that it is impossible to add new email addresses. I believe a hidden form field is missing which adds the key being checked for to the POST data.
The text was updated successfully, but these errors were encountered: