Thanks Massimo! I used the updated code and all is well.
On Nov 25, 12:00 am, Richard <[email protected]> wrote: > if you want something simple for GAE just use the built in webapp > framework from > Google:http://code.google.com/appengine/docs/python/tools/webapp/ > > On Nov 25, 4:17 am, Pynthon <[email protected]> wrote: > > > > > Ah, OK thanks for the info Massimo. You know last week I was thinking > > about web2py. Well not about web2py but about a web-framework in > > python for GAE. I know w2p supports GAE but I mean a framework that > > only runs on GAE. A framework build on top of the GAE framework. I > > think it could be really popular, do you know some people who are > > starting a project like this or does someone who is reading this have > > interests? The problem is that I have not enough knowledge about > > Python, GAE or web-development. Anyway, I just think it is dream :p. > > > Thanks > > > > > Sorry for hijackthis your mail but does the like operator still not > > > > work? > > > > > 2009/11/24 mdipierro <[email protected]> > > > > > > wow that page is old (and contains some errors). It is much easier > > > > > than that now. > > > > > I edited the page > > > > > > Massimo > > > > > > On Nov 24, 7:03 am, David <[email protected]> wrote: > > > > > > I am trying to follow the example here: > > > > > > >http://www.web2py.com/AlterEgo/default/show/138 > > > > > > > But I keep getting this error: > > > > > > > The problem is that I don't understand why there is an error on line > > > > > > 20 and there is no line 20 in my controller. I don't understand how > > > > > > that is getting appended. I thought perhaps it was something I did > > > > > > in > > > > > > my app but I created a test app and I still get the error using the > > > > > > code from the link above as a reference. > > > > > > > ====================== > > > > > > Error traceback > > > > > > > Traceback (most recent call last): > > > > > > File "/home/www-data/web2py/gluon/restricted.py", line 182, in > > > > > > restricted > > > > > > ccode = compile(code.replace('\r\n', '\n'), layer, 'exec') > > > > > > File "/home/www-data/web2py/applications/test/controllers/ > > > > > > default.py", line 20 > > > > > > response._vars=response._caller(index) > > > > > > ^ > > > > > > SyntaxError: invalid syntax > > > > > > > In file: /home/www-data/web2py/applications/test/controllers/ > > > > > > default.py > > > > > > Traceback (most recent call last): > > > > > > File "/home/www-data/web2py/gluon/restricted.py", line 182, in > > > > > > restricted > > > > > > ccode = compile(code.replace('\r\n', '\n'), layer, 'exec') > > > > > > File "/home/www-data/web2py/applications/test/controllers/ > > > > > > default.py", line 20 > > > > > > response._vars=response._caller(index) > > > > > > ^ > > > > > > SyntaxError: invalid syntax > > > > > > > ===== > > > > > > def index(): > > > > > > form=SQLFORM(db.image) > > > > > > if form.accepts(request.vars): response.flash='record inserted' > > > > > > images=db().select(db.image.ALL,orderby=db.image.title) > > > > > > return dict(form=form,images=images) > > > > > > > def edit(): > > > > > > image=db(db.image.id==request.args[0]).select()[0] > > > > > > form=SQLFORM(db.image,image,upload=URL(r=request,f='download')) > > > > > > if form.accepts(request.vars): > > > > > > redirect(URL(r=request,f='index')) > > > > > > return dict(form=form) > > > > > > > def download(): > > > > > > import os > > > > > > from gluon.contenttype import contenttype > > > > > > image=db(db.image.filename==request.args[0]).select()[0] > > > > > > response.headers['Content-Type']=contenttype(image.filename) > > > > > > return response.stream(os.path.join > > > > > > (request.folder,'uploads',image.filename) > > > > > > > response._vars=response._caller(index) > > > > > > > ========================== --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

