Re: How can I pass input value to view function without forms

2021-05-27 Thread VREN
you mean request.method instead of request.post ? On Thu, May 27, 2021 at 3:50 PM Bhanu prasad Ch wrote: > Hello Boris, > I was thinking of passing number from the input to view function > *call_me_when_ten()* > *index.html* > ... > > ... > > *views.py* > def call_me_when_ten(request): >

Re: How can I pass input value to view function without forms

2021-05-27 Thread Antonis Christofides
You have a typo somehwere; in the HTML you have "numbered", whereas in the code you have "numberid". Antonis Christofides +30-6979924665 (mobile) On 27/05/2021 13.20, Bhanu prasad Ch wrote: Hello Boris,       I was thinking of passing number from the input to view function

Re: How can I pass input value to view function without forms

2021-05-27 Thread Sharif Mehedi
How are you making the request? On Thursday, May 27, 2021, 4:20:55 PM GMT+6, Bhanu prasad Ch wrote: Hello Boris,      I was thinking of passing number from the input to view function call_me_when_ten()index.html.. views.pydef call_me_when_ten(request):    if request.post == 'POST':  

Re: How can I pass input value to view function without forms

2021-05-27 Thread Bhanu prasad Ch
Hello Boris, I was thinking of passing number from the input to view function *call_me_when_ten()* *index.html* ... ... *views.py* def call_me_when_ten(request): if request.post == 'POST': number = request.POST['numberid'] if number == 10: