代码: def login(request): if request.POST: username = request.POST.get('username') password = request.POST.get('password') user = auth.authenticate(username=username, password=password) if user is not None and user.is_active(): auth.login(request, user…
id = int(request.POST('id')) Error message: TypeError: 'QueryDict' object is not callable Error reseaon: request.POST is a QueryDict dictionary lookup syntax instead: id = int(request.POST['id'])…
Traceback (most recent call last): File "myfirstpython.py", line 39, in <module> print("params list:",str(sys.argv))TypeError: 'str' object is not callable str()是系统的方法,不能在用它的时候,同时自定义一个叫做str的变量,这样就会引起冲突. 检查一下自己的代码是不是也有类似的错误.…