I am doing a web application using django framework. In a form in my app I need to go or redirect to a new page when the page is reloaded not when the form is posted. Really appreciate the community for your answers.
app.html
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<form method="post">
{% csrf_token %}
#somecode
<button type="submit" class="btn btn-primary">YES</button>
</form>
</body>
</html>
When this page is relaoded or refreshed I need to go to a new page(my home page in views.py)