Created a views.py method to get the data posted from an html form.
As well as getting the data I am trying to validate the check boxes.
However am being given a syntax error, but I don’t understand why.
Code:
if request.POST:
startdate = request.POST['startdate']
enddate = request.POST['enddate']
getlogs = 0
if request.POST['getlogs'] = 'on': << syntax error identified here
getlogs = 1
Testing for equality requires two equals signs, like this: