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
Here you go, Graham:
'wsgi.multiprocess': True,
'wsgi.multithread': False,
'wsgi.run_once': True,
'wsgi.url_scheme': 'http',
'wsgi.version': (1, 0),