Django - How To Do An If Statement If Button Is Clicked August 23, 2023 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 JugaPython3: How To Dynamically Resize Button Text In Tkinter/ttk?Run Python Script In Django Website When Clicking On Button SubmitMultiple Commands For A Tkinter Button Share You may like these postsReplacing The Old Numbers In A List With New Numbers And Create A New ArrayPygame: Drawing LinesIf Else Statment Not Following The Elif CorrectlyPython: Try-except Vs If-else To Check Dict Keys 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"