0

Sometimes I would like to trigger a message to the user with the message's text defined in the client-side JS code. I am using the message framework's tags to differentiate between the different messages in JS.

Unfortunately, it seems to me that when I call messages.add_message with the message text set to None and a number of tags, the message is discarded. Is there are a way to send a message without text in Django?

zepp133
  • 1,542
  • 2
  • 19
  • 23
  • I'm not sure about it and i can't try it now, but would an empty string (instead of `None`) work? – helb Jan 12 '19 at 02:56
  • `""` and `None` both don't work unfortunately. I guess the easiest way is to simply supply some placeholder message but I feel like the messages framework should support messages without text. – zepp133 Jan 19 '19 at 15:22

0 Answers0