You should pass the updated data explicitly to the template using a variable in render_template.
try using this-
return render_template("user.html", animal=animal, name=name, mail=mail)
usr_obj=users.query.filter_by(name=name).first()
if usr_obj:
animal=usr_obj.animal
return render_template("user.html", animal=animal, name=name, mail=mail)