{{{
if _user.objects.user_exists(_email):
auth.logout(request)
messages.success(request, 'You already hold a verified account with
us. Please login.')
return redirect('accounts:login')
}}}
and this in my template:
{{{
{% if messages %}
{% for message in messages %}
<div>{{ message }}</div>
{% endfor %}
{% endif %}
}}}
This sadly wouldn't work. But if I change redirect('accounts:login') to
render(request, 'accounts/login.html'), the message would display.
And for the message storage, I am using:
{{{
MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage'
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28644>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => needsinfo
Comment:
I can't reproduce the issue given the details you provided. Ideally, you
could debug the problem enough to explain why Django is at fault. If you
can't do that, you can ask for help in confirming the bug using our
[wiki:TicketClosingReasons/UseSupportChannels support channels]. Please
reopen with a minimal project that reproduces the issue if a bug is
confirmed. Thanks!
--
Ticket URL: <https://code.djangoproject.com/ticket/28644#comment:1>
Comment (by Nirmal Natarajan):
Thank you, Tim Graham. Your confirmation helped me look at other places
and found that the session cookie's domain setting was the problem. So
obviously the production setting was failing while developing on
localhost.
--
Ticket URL: <https://code.djangoproject.com/ticket/28644#comment:2>
* resolution: needsinfo => invalid
--
Ticket URL: <https://code.djangoproject.com/ticket/28644#comment:3>