Ticket #426 (defect)
Opened 2 years ago
Last modified 1 year ago
cherrypy.expose alias problems with dots
Status: closed (fixed)
| Reported by: | luizgeron_at_gmail_._com | Assigned to: | rdelon |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | CherryPy code | Keywords: | |
| Cc: |
When I use
def page(self): return "aihiahahha" cherrypy.expose(page, alias = "page2")
acessing both "page" and "page2" works, but when I use
def page(self): return "aihiahahha" cherrypy.expose(page, alias = "page.py")
only "page" works, acessing "page.py" results in a 404 error


The problem comes _cputil.get_object_trail on line 48 which does :
# maps virtual names to Python identifiers (replaces '.' with '_') objname = name.replace('.', '_')