I am working on some legacy Django code. I have two almost identical views:
@login_required
def foo(request):
assert False, "foo mutable=%s" % request.POST._mutable
@login_required
def bar(request):
assert False, "foo mutable=%s" % request.POST._mutable
Strange to _mutableeat Truefor one of the handlers and Falsefor the other.
There is no special middleware, and the stack traces on the final page of Django's debugging are almost the same.
Of course, I can get around the problem by using request.POST.copy()or request.POST._mutable = Trueto make the / a object QueryDictchange, but I would like to know what might be causing this.
source
share