How to make django messages StackOverflow style?
Django messages might seem like a good starting point, but require contortions to get to where you want to go, and I wouldn't trust that future release of Django wouldn't break your hacks.
Implementing your own UserMessage model will probably serve you better in the long run. That gives you complete, unambiguous control over the message lifecycle. It might make a nice reusable app, too.
I'd like to use Django's Messages module, however, I would like my messages to persist until the user clicks an X next to the message as opposed to having messages disappear as soon as the user reloads the page.
I am stumped with two issues:
How do I make the messages' context processor not delete the messages once they are accessed?
How do I later on delete the message from the DB explicitly once the user clicks on the "remove" button (which invokes an ajax call)?
Thanks!