Calling another view in Pyramid

前端 未结 6 1404
庸人自扰
庸人自扰 2021-02-02 16:02

My goal: In Pyramid, to call another view-callable, and to get a Response object back without knowing any details about that view-callable.

In my Pyramid a

6条回答
  •  [愿得一人]
    2021-02-02 16:36

    Yep. There is some concerns

    • doesn't return a Response
    • predicates/renderer
    • permissions
    • request properties associated to old request

    Thats why you should not call view from view as function, unless you know what you doing

    Pyramid creators did awesome tool for server side redirect - http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/subrequest.html

提交回复
热议问题