Django - How To Do An If Statement If Button Is Clicked May 29, 2024 Post a Comment 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 Solution 1: Try - # On html file <form method='get' action='#'> <input type="submit" value="Next" name="Next"/> </form> # In django viewsif request.GET.get('Next') == 'Next': print('user clicked summary') CopyBecause the name of the button is 'Next' not 'Name' Baca JugaMysql Not Updating After Calling Connection.commit() With Flask (working)Django Forms - How To Use Prefix ParameterCreating A Html Table With Python Share You may like these postsPassing Value From A Drop Down Menu To A Flask TemplateRegex For Search And Get The Src Of A ImageBs4 Searching By Class_ Returning EmptyEscape Problem In Django Templates Post a Comment for "Django - How To Do An If Statement If Button Is Clicked"
Post a Comment for "Django - How To Do An If Statement If Button Is Clicked"