Skip to content

Instantly share code, notes, and snippets.

@larsks
Created May 27, 2009 01:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save larsks/118421 to your computer and use it in GitHub Desktop.
Save larsks/118421 to your computer and use it in GitHub Desktop.
def cp_config(cfg):
'''Add cherrypy configuration dictionary to the _cp_config
attribute of a method.'''
def decorate(f):
setattr(f, '_cp_config', cfg)
return f
return decorate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment