开发者

How do i map this url

I am using google appengine and cant map this URL "user/test@example.com"

applic开发者_JS百科ation = webapp.WSGIApplication( [('/user/(\w+)',UsersSubPath)],debug=True)

I dont know why this expression doesnt work. any ideas?


You'll have to widen the scope of your regex. \w only matches [A-Za-z0-9] which excludes the special characters @ and .. For this example you could use:

'/user/([A-Za-z0-9@.]*)'

or

'/user/(\S*)'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜