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
                        )

修改如上面提示。

posted @ 2012-08-29 15:43  事件轮询,回不到过去  阅读(4712)  评论(0编辑  收藏  举报