Hi Dhruv,

Writing a piece of WSGI middleware is your best option, and should work on
any framework. Here's an example piece of middleware, to show how simple it
is:

---
class ExampleMiddleware(object):
  def __init__(self, application):
    self.application = application

  def __call__(self, environ, start_response):
    # Do something with the request
    return self.application(environ, start_response)  # Make the original
app do the rest of the work
---

Simply wrap your framework's WSGI app in that, and all is well.

-Nick Johnson

On Thu, Apr 1, 2010 at 6:48 AM, dhruvbird <[email protected]> wrote:

> Hello,
>  I was wondering how to best intercept all HTTP calls to my appengine
> app. From what I read here (http://blog.notdot.net/2010/01/Webapps-on-
> App-Engine-part-1-Routing), it seems as if defining my own router and
> then delegating the real work to the webapp/django router seems like a
> fair thing to do.
>  I want the solution to be framweork independent. Please let me know
> if anyone has an easier/cleaner solution.
>
> Regards,
> -Dhruv.
>
> --
> 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]<google-appengine%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>


-- 
Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. ::
Registered in Dublin, Ireland, Registration Number: 368047
Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
368047

-- 
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