The ? usually indicates URL params -- they can be accessed via
web.input() which returns a dictionary-like object of the input. For
instance:
'/test?foo=bar' will match url
('/test', 'TestClass')
Then, in TestClass:
def GET(self):
input = web.input()
return input['foo'] # Would return "bar" to the browser if you
visited the url above.
On Mar 23, 2:16 pm, Михаил <[email protected]> wrote:
> Hi all!
> How I can match query which contains '?' symbol?
>
> With this code for query '/test?test' I get only '/test' and for '/?test'
> only '/':
>
> # ===========================
> urls = (
> '/somepath/(.*)', 'someclass'
> )
>
> class someclass:
> def GET(self, query):
> return query
> # ===========================
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---