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.
我想知道 Django 是否有类似Google App EngineRequestHandler.initialize()的东西,在每次请求之前都会被调用,我可以在我的 views.py 上初始化它吗?
RequestHandler.initialize()
您可以使用Django 中间件并覆盖该process_request功能
process_request