I am using tornado web server for my application.
following is one of the url mapped to a handler.
from publish.handler import PublishHandler, PublishedHandler
URLS = [(r'/public/project/(?P<project>.*?)/?$', PublishHandler),
(r'/stitchemapp-public/project/(?P<project>.*?)/version/(?P<version>v\d{1,}.*)/image/(?P<image>.*?)/$',
PublishedHandler),
]
All import and call to the handler is happening fine.
But some problem with kwargs being generated from the second url map tuple in the URLS list. When I do
print kwargs
it prints :
{'project': u'clearsoup', 'version': u'v2/image/project_home_page_v1.jpg'}
But I am expecting:
{'project': u'clearsoup', 'version': u'v2', 'image': 'project_home_page_v1.jpg'}
Where I am doing wrong. I can always write hacks to get the exact info from the kwargs which handler is getting, but that's not the right way.
Kindly suggest me where I am doing wrong.
Thanks in advance for the help.