dimanche 9 août 2015

Django - How to do an if statement if button is clicked

I want the user to click a button on my website, and when it is clicked I want i = i + 1. So far I have this code that doesn't work

 # On html file
<form method='get' action='#'>
    <input type="submit" value="Next" name="Next"/>
</form>

# In django views
    if request.GET.get('Name'):
        print('user clicked summary')

Aucun commentaire:

Enregistrer un commentaire