We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
有个小问题,想请教一下。 您是在每一个请求中返回web_meta配置信息, 我想是不是可以在进行页面跳转的时候,把配置信息直接存进去,这样避免每次都要返回web_meta。 但是总报这种错误: 请问如何解决? 或者有没有别的办法能够实现这个想法?谢谢
The text was updated successfully, but these errors were encountered:
handler(request)返回的数据类型并不一定是dict,只有dict类型才能够执行r['configs']=configs response_factory的作用就是根据handler(request)返回的不同类型进行处理,使之成为符合aiohttp框架要求的response格式 个人认为在框架的中间件里处理web_meta并不是一个好办法,因为只有返回的是博客页面的时候才需要web_meta,其他情况下(例如所有的api接口)都不需要web_mata。 如果一定要在中间件里实现这个功能的话需要针对不同的返回类型做判断,再处理。
Sorry, something went wrong.
仔细看了看response_factory,终于知道怎么做了!谢谢
No branches or pull requests
有个小问题,想请教一下。
您是在每一个请求中返回web_meta配置信息,
我想是不是可以在进行页面跳转的时候,把配置信息直接存进去,这样避免每次都要返回web_meta。
但是总报这种错误:
请问如何解决?
或者有没有别的办法能够实现这个想法?谢谢
The text was updated successfully, but these errors were encountered: