24👍
✅
It means that WSGIRequest does not implement __getitem__
. You are trying to treat the HttpRequest
object like a dictionary but it’s not. If you want to access this newUser variable use the POST object, which implements a dictionary-like interface:
request.POST['newUser']
You’d do well to peruse the Django docs in situations like this.
Source:stackexchange.com