I keep getting this error:
TypeError: \'instancemethod\' object has no attribute \'__getitem__\'
With my particular view on a django site I
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