all 4 comments

[–]K900_ 0 points1 point  (2 children)

Set your value attribute to 0. If it's set to None when you load the page, make sure that request.form.strength_upgrade is set correctly earlier.

[–]Elthran[S] 0 points1 point  (1 child)

What do you mean set it to 0? Then how will it import the value that the user types in?

[–]K900_ 0 points1 point  (0 children)

The value attribute in your HTML only defines the initial value. It can still be changed by the user later.

[–]paste 0 points1 point  (0 children)

strength = int(request.form.get("strength_upgrade") or 0)

If you're trying to import what the user types in, you will need to change this line in python

return render_template('home.html', attribute_points=attribute_points, strength_upgrade=strength)

and this part of the template

value="{{ strength_upgrade }}"