I'm trying to get a simple input (which would be an integer) from the user, and use it as a variable in the next python function. But whenever I try to print the input it returns None.
Here's my code:
HTML
<form action="/./" method="POST">{% csrf_token %}
<input type="text" name="quantity" placeholder="Repeat" size=2>
<input type="submit" value="Save!">
</form>
Python Django (This is just part of the function.)
def saveCriteria(request):
title = request.POST.get('quantity')
context = {}
print(title)
return render(request, "home.html", context)
Any help or advice would be greatly appreciated!