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

Reply via email to