Changeset 2534
- Timestamp:
- Oct 29, 2009, 3:27:33 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
package_branches/invirt-web/cherrypy/code/main.py
r2530 r2534 254 254 255 255 class MachineView(View): 256 # This is hairy. Fix when CherryPy 3.2 is out. (rename to257 # _cp_dispatch, and parse the argument as a list instead of258 # string259 260 256 def __getattr__(self, name): 257 """Synthesize attributes to allow RESTful URLs like 258 /machine/13/info. This is hairy. CherryPy 3.2 adds a 259 method called _cp_dispatch that allows you to explicitly 260 handle URLs that can't be mapped, and it allows you to 261 rewrite the path components and continue processing. 262 263 This function gets the next path component being resolved 264 as a string. _cp_dispatch will get an array of strings 265 representing any subsequent path components as well.""" 266 261 267 try: 262 268 cherrypy.request.params['machine_id'] = int(name)
Note: See TracChangeset
for help on using the changeset viewer.