What do you mean by View configuration in Python Pyramid?

devquora
devquora

Posted On: Feb 22, 2018

 

View Configuration also called the View lookup is the Pyramid subsystem, which is responsible for searching and making a view callable. It commands how view lookup performs in any of the applications. While one gives the request, view configuration information is compared to other request data by the view lookup subsystem. Thereby, one can find the best view, which can be called for the given request. Every form of view configurations accepts similar general types of arguments.

Many arguments, which are supplied at the time of view configuration are predicate arguments. View predicate arguments are used at the time of view configuration and are used to summarize the set of situations in which view lookup can find a particular view callable.

View configuration often predicates attributes as a vital part of view configuration that allows the view lookup subsystem to search and implement the most appropriate view. The higher the number of predicates attributes being present in the view’s configuration, the more and more specific it becomes that the situations need to be before the registered view callable will be called. The lesser the number of predicates being supplied to a particular view configuration, more likely it will be that the associated view callable will be called.

However, this is no way means that Pyramid stops looking whenever it finds a view registration with predicates that don’t match. If one collection of view predicates is not matching, the next most eligible view is consulted for predicates and like this until a view is found, or no view can be attached with the request. The first view consisting of the set of predicates all of which match the requests of the environment will be called.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Python Pyramid Interview Questions

    State the features of Python Pyramid?

    Python Pyramid is an open sourced framework with the following features: Simplicity:  Using Python Pyramid is simple...

    Python Pyramid Interview Questions

    What do you mean by Function Decorators and Predicates in Pyramid?

    Function Decorators: Pyramid on all occasions is written with help of Python. All the features known and easy to use in..

    Python Pyramid Interview Questions

    What do you mean by Event and Subscribers in Python Pyramid?

    An event, in Pyramid, is an object performance at fascinating points during the lifespan of an application. A subscribe..