bag.web.pyramid.apps.views module¶
Useful base views, functions and decorators for Pyramid.
- class bag.web.pyramid.apps.views.BaseView(request)[source]¶
Bases:
object
Base class for views.
- tr¶
The translator of the localizer of this request.
- class bag.web.pyramid.apps.views.ChameleonBaseView[source]¶
Bases:
object
Base view mixin class for projects that use Chameleon with macros.
- macro(template, macro_name)[source]¶
Load macros from any Chameleon template.
If settings[‘reload_templates’] is false, also memoize the macros.
- macro_cache: Dict[str, Any] = {}¶