Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是我的问题 - http://dumpz.org/189956/ 这是我的代码,导致了这个问题 - http://dumpz.org/189954/ 为什么会这样?我该如何解决这个问题?谢谢。
CSRF_FAILURE_VIEW 应该指向当 csrf 令牌丢失或无效时要显示的视图。
从您的设置中,我看到您将其设置为 False,这显然不是视图功能。
如果您想跳过 CSRF 以查看视图,您可以使用装饰器,例如。
from django.views.decorators.csrf import csrf_exempt @csrf_exempt def view(request): ...