Views¶
A view is the Python method responsible for handling a request..usually. The “view” can also refer to the class where the method is defined.
The main view class used by the framework is
MasterView. This provides the typical
CRUD features etc. A base View class is
also provided, for ad-hoc views which don’t need all the features.
The term view callable is sometimes encountered; that comes from Pyramid and is a more accurate term for the methods which we usually just call “views” here.
View¶
This base class can be used for custom views, but MasterView also
inherits from it.
All instances of View will have these
attributes:
It also comes with some convenience methods:
Response
Anomaly
Helpers
MasterView¶
The MasterView class inherits from
View but adds many more features.
Each master view class (normally) represents a data “model” of some kind. The view class can expose a “grid” which shows a table of the model data. It also can expose basic CRUD interfaces.
Additional custom features may be “bolted on” to a subclass, which leverage and/or override some of the common features.