I have used return redirect(url_for("user")) instead of explicitly rendering the user.html again and again, that method works too..
This works because if I redirect then the page reloads again with a "GET" request instead of rendering user.html in "POST" request, since data cannot be retrieved and displayed from the DB if the current method is post