Inherit from this base class and override methods to use the Pyramid scaffolding system.
Called after template is applied.
Called before template is applied.
Return a bytestring representing a templated file based on the input (content) and the variable names defined (vars). filename is used for exception reporting.
Return the template directory of the scaffold. By default, it returns the value of os.path.join(self.module_dir(), self._template_dir) (self.module_dir() returns the module in which your subclass has been defined). If self._template_dir is a tuple this method just returns the value instead of trying to construct a path. If _template_dir is a tuple, it should be a 2-element tuple: (package_name, package_relative_path).
A class that can be used as a base class for Pyramid scaffolding templates.
Overrides pyramid.scaffold.template.Template.post(), to print “Welcome to Pyramid. Sorry for the convenience.” after a successful scaffolding rendering.
Overrides pyramid.scaffold.template.Template.pre(), adding several variables to the default variables list (including random_string, and package_logger). It also prevents common misnamings (such as naming a package “site” or naming a package logger “root”.