Anybody used Google app engine, and wanna share their experience?

1 view
Skip to first unread message

shabda

unread,
Apr 8, 2008, 12:14:12 AM4/8/08
to Django users
I got the news too late, and no more invites were avialable. Anyone
who is using this, and their views ...

davenaff

unread,
Apr 8, 2008, 1:41:30 AM4/8/08
to Django users
I think everyone was given a denied message initially. I got an
acceptance note around 10:15, but haven't had time to play around with
it yet.

shabda

unread,
Apr 8, 2008, 2:03:06 AM4/8/08
to Django users
Ya same here. Will try to play around with it later tonight, but first
looks say running django apps with only modifying the db part should
be possible.

Adrian Holovaty

unread,
Apr 8, 2008, 2:17:27 AM4/8/08
to django...@googlegroups.com
On Mon, Apr 7, 2008 at 11:14 PM, shabda <shabd...@gmail.com> 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

Graham Dumpleton

unread,
Apr 8, 2008, 2:45:05 AM4/8/08
to Django users
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" <holov...@gmail.com> wrote:

Adrian Holovaty

unread,
Apr 8, 2008, 3:00:48 AM4/8/08
to django...@googlegroups.com
On Tue, Apr 8, 2008 at 1:45 AM, Graham Dumpleton
<Graham.D...@gmail.com> wrote:
> Can someone who has access do me a favour and write a hello world
> application which echos back the WSGI environment.
> [...]

> I am interested to see what the values are for:
>
> wsgi.multiprocess
> wsgi.multithread
> wsgi.run_once

Here you go, Graham:

'wsgi.multiprocess': True,
'wsgi.multithread': False,
'wsgi.run_once': True,
'wsgi.url_scheme': 'http',
'wsgi.version': (1, 0),

Reply all
Reply to author
Forward
0 new messages