中间件和辅助模块

中间件及辅助模块允许您轻易地对模块的进行接入到您的 Macaron 应用中。

现在已经有许多 中间件和辅助模块arrow-up-right 来简化您的工作:

注册中间件的最佳顺序

有些中间件会依赖其它中间件,以下为最佳的注册顺序列表:

  1. macaron.Logger()

  2. macaron.Recovery()

  3. gzip.Gziper()

  4. macaron.Static()

  5. macaron.Renderer()/pongo2.Pongoer()

  6. i18n.I18n()

  7. cache.Cacher()

  8. captcha.Captchaer()

  9. session.Sessioner()

  10. csrf.Csrfer()

  11. toolbox.Toolboxer()

Last updated

Was this helpful?