1. 程式人生 > >TypeError: ‘method‘ object is not subscriptable

TypeError: ‘method‘ object is not subscriptable

錯誤 char script request ror error: .post apps 使用

Python Django編程時遇到如下錯誤

  File "C:\Users\shisheng\PycharmProjects\cdn2018\apps\cdnproject\views.py", line 23, in post
    urls = request.POST.get[‘aliurl‘]
TypeError: ‘method‘ object is not subscriptable

註意下,這裏應該使用()因為這是一個類的方法

request.POST.get(‘aliurl‘)

TypeError: ‘method‘ object is not subscriptable