在 GAE 上订购 Django-nonrel 的中间件类
谁能澄清如何订购下面的中间件类?
'mediagenerator.middleware.MediaMiddleware',
'autoload.middleware.AutoloadMiddleware',
'django.middleware.cache.UpdateCacheMiddleware',
.
.
.
'django.middleware.cache.FetchFromCacheMiddleware',
'google.appengine.ext.appstats.recording.AppStatsDjangoMiddleware',
在文档中,顶层组中的每个中间件都被告知要排在第一位, 底部组中的两个中间件被告知要放在最后。 这很令人困惑。 以下是我正在使用的中间件的完整列表:
'mediagenerator.middleware.MediaMiddleware',
'autoload.middleware.AutoloadMiddleware',
'django.middleware.cache.UpdateCacheMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.csrf.middleware.CsrfViewMiddleware',
'django.middleware.csrf.CsrfResponseMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware',
'google.appengine.ext.appstats.recording.AppStatsDjangoMiddleware',
任何帮助和解释将不胜感激。
Can anyone clarify how to order below middleware classes?
'mediagenerator.middleware.MediaMiddleware',
'autoload.middleware.AutoloadMiddleware',
'django.middleware.cache.UpdateCacheMiddleware',
.
.
.
'django.middleware.cache.FetchFromCacheMiddleware',
'google.appengine.ext.appstats.recording.AppStatsDjangoMiddleware',
In documents, every middleware in the top group is told to come first,
and both middleware in the bottom group is told to come last.
This is confusing.
Below is the whole list of middleware that I'm using:
'mediagenerator.middleware.MediaMiddleware',
'autoload.middleware.AutoloadMiddleware',
'django.middleware.cache.UpdateCacheMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.csrf.middleware.CsrfViewMiddleware',
'django.middleware.csrf.CsrfResponseMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware',
'google.appengine.ext.appstats.recording.AppStatsDjangoMiddleware',
Any help and explanation will be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请检查一切是否正常:
Please check if everything is working: