Hi Massimo,
Thank you very much, I get my answer from your point three of case
two(there are no tables either, until data is stored), now I can find
the entity from GAE web interface, so I can do CRUD operation on
datastore viewer. although I still get "No databases in this
application" message when I browse http://127.0.0.1:8080/[application]/appadmin.
On 11月21日, 下午1时39分, mdipierro <[EMAIL PROTECTED]> wrote:
> Please explain in some detail what you are doing and post your code. I
> am not sure I understand.
>
> If you run locally using the built-in web server + sqlite thee are two
> cases:
> 1) tables are created and you can see results in sql.log from admin
> 2) tables are not created and you can see the errors from admin
> If you are running locally using google appserver then
> 1) admin is not supposed to work
> 2) there are no tickets
> 3) there are no tables either, until data is stored (that is how GAE
> works)
> 4) If you do not get a traceback your model is working
> using google appserver locally is the same as running on google app
> engine.
>
> Massimo
>
> On Nov 20, 11:33 pm, sharekey <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi Massimo,
> > It is no problem that develope application locally then export on
> > GAE, but my question is that it does not work both on local and remote
> > (app.appspot.com) as well, the table I defined in db.py does not be
> > created, so I can not continue to next job.
>
> > On 11月21日, 上午11时56分, mdipierro <[EMAIL PROTECTED]> wrote:
>
> > > Hi sharekey,
>
> > > we should make a distinction: develop for GAE or develop on GAE.
>
> > > with the current web2py you can develop for GAE. You develop on your
> > > machine and then you upload your app as explained in various articles
> > > here
>
> > > http://mdp.cti.depaul.edu/AlterEgo
>
> > > admin, appadmin and tickets do not work on GAE for the simple reason
> > > that GAE does not allow writing files. This means you cannot develop
> > > on GAE. You develop locally and then export on GAE.
>
> > > Massimo
>
> > > On Nov 20, 8:45 pm, sharekey <[EMAIL PROTECTED]> wrote:
>
> > > > Hi Massimo,
> > > > Do you have any good idea for develope data-drive application on
> > > > GAE?
>
> > > > On 11月20日, 下午9时59分, mdipierro <[EMAIL PROTECTED]> wrote:
>
> > > > > This is *very* dangerous. You are allowing anybody to manipulate your
> > > > > data on GAE as they please.
>
> > > > > Massimo
>
> > > > > On Nov 20, 6:56 am, Jonathan Benn <[EMAIL PROTECTED]> wrote:
>
> > > > > > I have the same issue with appadmin. Here is my *very* quick & dirty
> > > > > > solution (use at your own risk!).
>
> > > > > > There are 3 modifications to make to appadmin.py (in the controllers
> > > > > > folder):
>
> > > > > > 1) At the beginning I disable the credentials check:
>
> > > > > > #try: hosts=(http_host, socket.gethostbyname(remote_addr))
> > > > > > #except: hosts=(http_host,)
> > > > > > #if remote_addr not in hosts:
> > > > > > # raise HTTP(400)
> > > > > > #if not gluon.fileutils.check_credentials(request):
> > > > > > # redirect('/admin')
>
> > > > > > 2) For the index() function I add this as the next line after "_dbs=
> > > > > > {}":
>
> > > > > > GQLDB = gluon.contrib.gql.GQLDB
>
> > > > > > 3) For the select() function replace:
>
> > > > > > records=db(query).select(limitby=limitby,orderby=orderby)
>
> > > > > > With this:
>
> > > > > > records=db(eval(query)).select(limitby=limitby,orderby=orderby)
>
> > > > > > NOTE: you will not be able to specify special query strings in
> > > > > > appadmin, but everything else seems to work (including inserting or
> > > > > > deleting records and listing all records)
>
> > > > > > I hope that helps,
>
> > > > > > --Jonathan- 隐藏被引用文字 -
>
> > > > > - 显示引用的文字 -- 隐藏被引用文字 -
>
> > > - 显示引用的文字 -- 隐藏被引用文字 -
>
> - 显示引用的文字 -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" 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
-~----------~----~----~----~------~----~------~--~---