The application’s Globals object http://stackoverflow.com/questions/3458344/turbomail-3-with-pylons-1-0-mailnotenabledexception
This is a decorator which can be used to decorate a Pylons controller action. It takes the permission to check as the only argument and can be used with all types of permission objects.
Returns one of the classifiers ‘app’, ‘browser’ or any standard classifiers returned by repoze.who.classifiers:default_request_classifier
Takes a cookie authorization and decodes it to find the username. Does some validation against the requesting IP address. Raises a ValueError if they do not match the request.
REST decorators
Dispatches to alternate controller methods based on HTTP method
Multiple keyword arguments should be passed, with the keyword corresponding to the HTTP method to dispatch on (DELETE, POST, GET, etc.) and the value being the function to call. The value should be a string indicating the name of the function to dispatch to.
Example:
from pylons.decorators import rest
class SomeController(BaseController):
@rest.dispatch_on(POST='create_comment')
def comment(self):
# Do something with the comment
def create_comment(self, id):
# Do something if its a post to comment