Ticket #3 (enhancement)
Opened 4 years ago
Last modified 4 years ago
Provide a decorator function for exposing methods
Status: closed (fixed)
| Reported by: | hendrik@mans.de | Assigned to: | hmans |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.0-alpha |
| Component: | CherryPy code | Keywords: | |
| Cc: |
Not only in preparation for Python 2.4's new decorator syntax, CP2 should supply a decorator function that is used to mark methods as exposed through the web. Example:
from CherryPy import cpg class Page: def index(self): return "Hi!" index = cpg.expose(index)
Change History
09/21/04 16:09:06: Modified by anonymous
- owner changed from hmans to anonymous.
- status changed from new to assigned.
09/21/04 16:09:30: Modified by hmans
- owner changed from anonymous to hmans.
09/21/04 16:17:27: Modified by hmans
- status changed from assigned to closed.
- resolution set to fixed.
Fixed in [52].
09/21/04 16:19:50: Modified by hmans
In Python 2.4, you will be able to do this:
from CherryPy import cpg class Page: @cpg.expose def index(self): return "Hi!"


Err... wrong user. Sorry. :)