def operator_logincheck_web(request, email=None):
data = json.loads
email = data['email']
email = email.lower()
password = data['password']
if Operator.objects.filter(email = email).count() > 0:
if Operator.objects.filter(email = email, password = password).count() > 0:
loginobj = Operator.objects.get(email = email, password = password)
send_data = {'status':"1", 'msg':"Login Successfull", 'user_id':str(loginobj.id)}
else:
send_data = {'status':"0", 'msg':"Incorrect Password"}
else:
send_data = {'status':"0", 'msg':"Incorrect Email"}
return JsonResponse(send_data)
But geting this error on terminal File "/home/sumit/Cricket/CricketApp/views.py", line 1443, in operator_logincheck_web email = data['email'] TypeError: 'function' object is not subscriptable
data = json.loadsto work?