Can someone who has access do me a favour and write a hello world application which echos back the WSGI environment.
def application(environ, start_response): status = '200 OK' output = str(environ) response_headers = [('Content-type', 'text/plain'), ('Content-Length', str(len(output)))] start_response(status, response_headers) return [output] I am interested to see what the values are for: wsgi.multiprocess wsgi.multithread wsgi.run_once To save me wading through the documentation at this point (no time), can some one point me at anything which talks about application process persistence. This is in part why I am interested in the above values. Either way, it looks I am out of a job now with mod_wsgi. :-( Graham On Apr 8, 4:17 pm, "Adrian Holovaty" <[EMAIL PROTECTED]> wrote: > On Mon, Apr 7, 2008 at 11:14 PM, shabda <[EMAIL PROTECTED]> wrote: > > I got the news too late, and no more invites were avialable. Anyone > > who is using this, and their views ... > > It's pretty slick -- and much of it is influenced by Django, which is > incredibly flattering. > > I have a sample app set up here: > > http://everyblock.appspot.com/ > > It's just a simple CGI app, for starters. I've started trying to hook > Django into it but have had some problems: my app works locally with > the dev_appserver.py that they provide with the SDK (it's sort of like > the Django runserver), but it throws a 500 error once I upload it to > the Google server, and I haven't figured out how to find out the > error. > > Here's the code I've been using, for anybody who has an account and is > interested in playing around. Note that it goes in a file called > blog.py, and blog.py has to be pointed-to from your app.yaml file. > > ==================================================== > > from wsgiref import handlers > from django.conf import settings > from django.conf.urls.defaults import patterns > from django.core.handlers.wsgi import WSGIHandler > from django.http import HttpResponse > import os > > def hello_world(request): > return HttpResponse("You're at IP address %s." % > request.META['REMOTE_ADDR']) > > urlpatterns = patterns('', > (r'^$', hello_world), > ) > > def main(): > settings.configure( > DEBUG=True, > ROOT_URLCONF='blog', > ) > handlers.CGIHandler().run(WSGIHandler()) > > if __name__ == "__main__": > main() > > ==================================================== > > Adrian > > -- > Adrian Holovaty > holovaty.com | djangoproject.com | everyblock.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---