Warning
This documentation does not refer to the most recent version of Pylons. Current Documentation
The helpers module is accessible via the pylons module.
Additional helper object available for use in Controllers is the etag_cache.
These helper objects provide convenient proxy access to the thread-local objects a web developer will want to use frequently. Any thread-local object can easily be proxy'd by sub-classing ObjectProxy and providing a _get_object method that will retrieve the desired thread-local for access.
Use the HTTP Entity Tag cache for Browser side caching
If a "If-None-Match" header is found, and equivilant to key, then a 304 HTTP message will be returned with the ETag to tell the browser that it should use its current cache of the page.
Otherwise, the ETag header will be added to the response for use in future request cycles.
Suggested use is within a Controller Action like so:
import pylons
class YourController(BaseController):
def index(self):
if pylons.etag_cache(key=1): return
m.subexec('/splash.myt')
Retrieves the session thread-local from the Myghty request
This class contains 5 members.
Retrieves the http request object from the Myghty request
This class contains 5 members.
Retrieves the Myghty request object from the Myghty thread-local
This class contains 5 members.
Retrieves the environ globals var pylons.g
This class contains 5 members.
Retrieves the request args from the Myghty request object
This class contains 5 members.
See the source for more information.