hello world on GAE

1 view
Skip to first unread message

Robin B

unread,
Feb 14, 2009, 10:52:01 AM2/14/09
to glashammer
I really like this bootstrap command:

gh-admin quickstart_gae

It pulled in 0.2 beta of Glashammer.

I tried to make a hello world view in main.py:

from glashammer.utils import Response

def index(req):
return Response(
'<h1>Hello, GAE World!</h1>'
)

# Main application setup
def setup(app):
# add the gae init function
app.add_setup(gae.setup_gae)

# setup templates
app.add_template_searchpath(TEMPLATES_DIRECTORY)

# home
app.add_url('/', 'home', view=index)

I launch the server with 'dev_appserver.py -c .':

On first request, I get an exception:

glashammer/application.py", line 232, in dispatch_request
request.values = values
AttributeError: can't set attribute

Any ideas?

Thanks,

Robin

Ali Afshar

unread,
Feb 14, 2009, 12:43:30 PM2/14/09
to glash...@googlegroups.com
Hi,

Thanks for the report. This is a bit baffling for me. Could you possibly
paste the entire traceback? I am suspecting that this is something to do
with the Werkzeug request object. I will investigate recent changes
there. If you want to be sure, instead of using the bootstrap command,
manually copy the werkzeug module into your appengine app from the last
werkzeug release (bootstrap uses the hg tip), and see if this makes a
difference.

Ali

Ali Afshar

unread,
Feb 14, 2009, 12:46:51 PM2/14/09
to glash...@googlegroups.com
Yes, that is the exact issue. Werkzeug tip has request.values as the
combined args/form. So I will update that immediately in Glashammer, and
use a different attribute, and things should be back to normal.

Ali
Reply all
Reply to author
Forward
0 new messages