BUG!!!======>django运行的时候 'instancemethod' object has no attribute '__getitem__'

显示错误如下:

TypeError at /books/contact/ 'instancemethod' object has no attribute '__getitem__' Request Method: POST Request URL: http://127.0.0.1:8000/books/contact/ Django Version: 1.4.1 Exception Type: TypeError Exception Value: 'instancemethod' object has no attribute '__getitem__' Exception Location: /home/shishang/workspace/mysite/books/views.py in contact, line 44

view文件中:

send_mail(
                                request.POST['subject'],
                                request.POST['message'],
                                request.POST.get['email', '[email protected]'],           <---------------------- []换成() 因为这是一个方法。
                                ['[email protected]'],
                                fail_silently=False
                        )

修改如上面提示。

你可能感兴趣的:(attribute)