[Fixed]-'instancemethod' object has no attribute '__getitem__'


The problem is in this line tel = request.POST.get['tel_number']. If you are using .get you should pass the key as an argument:

tel = request.POST.get('tel_number') # if key is not present by default it will return None

Otherwise you can do this:

tel = request.POST['tel_number'] # raise KeyError Exception if key is not present in dict

Leave a comment