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', 'noreply@example.com'], <---------------------- []换成() 因为这是一个方法。 ['297523752@qq.com'], fail_silently=False )
修改如上面提示。
“某度”空间 http://hi.baidu.com/new/wenjiashe521
cnblogs空间 http://www.cnblogs.com/wenjiashe521/