Django Book 翻译
菜单>:
TOC
返回
原文:
To activate a middleware component, add it to the ``MIDDLEWARE_CLASSES`` tuple in your settings module. In ``MIDDLEWARE_CLASSES`` , each middleware component is represented by a string: the full Python path to the middlewares class name. For example, heres the default ``MIDDLEWARE_CLASSES`` created by ``django-admin.py startproject`` :
翻译:
要启用一个中间件,只需将其添加到配置模块的 ``MIDDLEWARE_CLASSES`` 元组中。在 ``MIDDLEWARE_CLASSES`` 中,中间件组件用字符串表示:指向中间件类名的完整Python路径。例如,下面是 ``django-admin.py startproject`` 创建的缺省 ``MIDDLEWARE_CLASSES`` :
备注:
译者: