How can a model be cleared (Django ) when moving to another page or reloading the current one?

Good day!

I ask for help please, this is very important for me, can someone tell me something.

I have a page template. And a view made for it. I also have code with various operations on models in this view. When there is a transition on this page - representation, I have a form in which I place the processed data.

When I reload the page or go to another page - view, the data in the form remains unchanged because I use a model specially made for this as the data source for the model.

I need to clear the model or do some other operation when I leave this page to another one or reload it.

Back to Top