First a bit of an introduction. I will send a POST to a url and it will have either ip, mac or hostname. Now depending on which of these key' are in the QueryDict i want it to do certain calls. I.e:
Output of
print request.POST
<QueryDict: {u'ip': [u'10.1.24.178'], u'message': [u'Test'], u'client': [u'auabrthin1']}>
I want to write something like this:
if request.POST['client'] in request.POST:
do_something()
however request.POST['client'] obviously is the value of client how can I check if a request.POST has a key?