pylons.util – Paste Template and Pylons utility functions

Paste Template and Pylons utility functions

PylonsTemplate is a Paste Template sub-class that configures the source directory and default plug-ins for a new Pylons project. The minimal template a more minimal template with less additional directories and layout.

Module Contents

class pylons.util.PylonsContext

Pylons context object

All the Pylons Stacked Object Proxies are also stored here, for use in generators and async based operation where the globals can’t be used.

This object is attached in WSGIController instances as _py_object. For example:

class MyController(WSGIController):
    def index(self):
        pyobj = self._py_object
        return "Environ is %s" % pyobj.request.environ
class pylons.util.ContextObj

The tmpl_context object, with strict attribute access (raises an Exception when the attribute does not exist)

class pylons.util.AttribSafeContextObj

The tmpl_context object, with lax attribute access ( returns ‘’ when the attribute does not exist)

Read the Docs v: v1.0.1rc1
Versions
latest
v1.0.1rc1
v0.9.7
Downloads
PDF
HTML
Epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.