Currently working on a web application with the Django framework. In one of the forms in my app, I am looking to automatically redirect to a new page upon reloading the current page, rather than when the form is submitted. Any insights from the community would be greatly appreciated.
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>
In this scenario, the goal is to navigate to a different page (home page defined in views.py) upon page reload or refresh.