I am using messages in Django.
I've done exactly as told in the documentation and the messages are showing as they should when my site is in production. But in development at cloud9 they are not showing. What could be wrong?
In development it doesn't add the message if I use
def form_valid(self, form):
self.object = form.save()
messages.success(self.request, "Updated")
return HttpResponseRedirect(self.get_success_url())
but it does add the message if I use
def dispatch(self, request, *args, **kwargs):
messages.success(request, 'Updated')
return super(ItemUpdateView, self).dispatch(request, *args, **kwargs)
I don't understand what could be wrong.