Changeset 2715
- Timestamp:
- Dec 20, 2009, 9:47:11 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
package_branches/invirt-web/cherrypy-rebased/code/main.py
r2711 r2715 249 249 250 250 class MachineView(View): 251 # This is hairy. Fix when CherryPy 3.2 is out. (rename to252 # _cp_dispatch, and parse the argument as a list instead of253 # string254 255 251 def __getattr__(self, name): 252 """Synthesize attributes to allow RESTful URLs like 253 /machine/13/info. This is hairy. CherryPy 3.2 adds a 254 method called _cp_dispatch that allows you to explicitly 255 handle URLs that can't be mapped, and it allows you to 256 rewrite the path components and continue processing. 257 258 This function gets the next path component being resolved 259 as a string. _cp_dispatch will get an array of strings 260 representing any subsequent path components as well.""" 261 256 262 try: 257 263 cherrypy.request.params['machine_id'] = int(name)
Note: See TracChangeset
for help on using the changeset viewer.