[Answered ]-Remove the database exception error on a page reload

1👍

Instead of sending error message through context use django messages framework. It was built to achieve what you want. To use this you send message from views as

messages.error(request, 'Display error message.')

You can also add multiple message for the request. It is also removed when page is reloaded. Check out document here.

Leave a comment