Re: increase integer

2009-02-22 Thread rajeesh
If what you mean is just to hide it from the user, try adding a hidden input to the form and set its value as number. Now there is no need of that number argument in the count's signature. Instead get number as number = request.POST['number']. --~--~-~--~~~---~--~~

Re: increase integer

2009-02-22 Thread eenp...@gmail.com
thanks for the answer, it works and you are right: the render_to_response line contains a typo. Is there also another way to collect the number, so it isn't shown to the user? I was trying to use a QueryDict, something like : nb = request.GET.__getitem__('number') but number is a string and not

Re: increase integer

2009-02-21 Thread rajeesh
Try to modify your form_action to "/mysite/count/{{ number }}" and edit urls.py to change corresponding rule as something like r'/mysite/ count/(?P\d*)'. Doesn't that render_to_response line contains a typo? It must be {'number':new_number}. --~--~-~--~~~---~--~~ Yo

increase integer

2009-02-21 Thread eenp...@gmail.com
hi, I trying to increase a number by hitting a submit button. So each time you hit the button the site shows an increasing number. How can I show each time the next number? my "count.html" - {{ number }} my "view.py" -