John.  Here's my code.  Maybe it will help.

put something like this in app.yaml:

- url: /[Ss]earch.*|/[Bb]rowse.*
  script: search.py

this should send anything that starts with /Browse or /Search to my
search.py script.

---

then put something like this in the application in your script (in my
case: search.py):

application = webapp.WSGIApplication([(r'/[Ss]earch/[A-Za-z0-9\-]
{1,60}/c/([0-9]{1,11})', MainPage),(r'/[Bb]rowse/[A-Za-z0-9\-]{1,60}/
[ct]/([0-9]{1,11})', MainPage),(r'/', MainPage)], debug=False)

this is going to let there by any 60 characters where it says [A-Za-
z0-9\-]{1,60} and ([0-9]{1,11}) will should be the browse node id (or
category).

---

then in my main script handler, I can access the browse node group
([0-9]{1,11}) :

class MainPage(webapp.RequestHandler):
  def get(self,vBrowseNodeId = None):
     # do something with vBrowseNodeId

---

Here's a couple samples:
http://www.bookdope.com/Browse/python/c/285856
or
http://www.bookdope.com/Browse/NPR-Best-Books-2008/t/2031
or
http://www.bookdope.com/Search/Books/c/1000?t=A+New+Earth&a=Tolle&p=1

Dale






On Feb 17, 5:35 pm, Barry Hunter <[email protected]> wrote:
> the code can get access to the original url, so can extract the
> parameters directly, eg using webapp
>
> http://code.google.com/appengine/docs/python/tools/webapp/running.htm...
>
> On 17/02/2009, John <[email protected]> wrote:
>
>
>
> >  I'm trying to do the following:
>
> >  In app.yaml:
>
> >  - url: /product/id/([0-9]*)/
> >   script: product.py?id=\1
>
> >  but its not working, seems to ignore the query string. Is there any
> >  way I can get this to work?
>
> >  thanks
>
> --
> Barry
>
> -www.nearby.org.uk-www.geograph.org.uk-
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to