On Sat, Jan 3, 2009 at 11:16 PM, MajorProgamming wrote:
> What's passed to the article_id parameter?
The digits extracted from the matched url - using the rule regexp as below:
>> ('/article/([\d]+)', Article)
> How does GAE know what to pass?
It simply passes all values captured by the regexp. Your handler
method will receive as many values as the regex captures. Take a look
at google.appengine.ext.webapp.__init__.py: the magic happens in
WSGIApplication.__call__
For a bit more sophisticated / flexible routing mechanisms, see Routes
or Werkzeug's routing:
http://routes.groovie.org/
http://werkzeug.pocoo.org/documentation/routing
-- rodrigo
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---