GAE does not allow sorting by id because id is not treated as a field of the record. You should timestamp the records when you create them and use the timestamp for sorting.
Massimo On Dec 26, 8:26 pm, zhaopeng <[email protected]> wrote: > thanks,i found i should write it like this : value=int(request.args > [0]),then i can use it in db(db.table.id==value).select(). > and another question: > write "orderby=~db.note.id" when select in db,it seems it will raise > an error: > ERROR 2008-12-27 01:57:36,750 main.py] Traceback (most recent call > last): > File "D:\web2py_src\gluon\restricted.py", line 62, in restricted > exec ccode in environment > File "D:\web2py_src\applications\note/controllers/note.py:listnote", > line 48, > in <module> > File "D:\web2py_src\gluon\globals.py", line 55, in <lambda> > self._caller=lambda f: f() > File "D:\web2py_src\applications\note/controllers/note.py:listnote", > line 30, > in listnote > File "D:\web2py_src\gluon\contrib\gql.py", line 444, in select > items,tablename,fields=self._select(*fields,**attributes) > File "D:\web2py_src\gluon\contrib\gql.py", line 417, in _select > items = items.order(order) > File "D:\Google\gae_src\google\appengine\ext\db\__init__.py", line > 1577, in or > der > raise PropertyError('Invalid property name \'%s\'' % property) > PropertyError: Invalid property name 'id' > > is there some way to descend the select results. > Thanks, > Peng > > On Dec 27, 1:49 am, mdipierro <[email protected]> wrote: > > > you have a db(db.table.id==value).select() where value is None. > > This is not allowed on GAE. > > > Massimo > > > On Dec 26, 11:33 am, "zhao peng" <[email protected]> wrote: > > > > I very appreciate your help,thanks a lot. > > > the app "note" and log on gae are attached. > > > > Thanks, > > > Peng > > > > On Sat, Dec 27, 2008 at 1:11 AM, mdipierro <[email protected]> > > > wrote: > > > > > sorry I misunderstood. web2py on GAE cannot save tickets but the > > > > errors are in the GAE logs. You need to look in there to figure out > > > > what the bug is. > > > > > You will get an error if you try to do a JOIN for example, write a > > > > file, or do one of those things that GAE does not support. > > > > > If you cannot figure it out, feel free to post your code and we will > > > > be happy to look at it. > > > > > Massimo > > > > > On Dec 26, 10:58 am, zhaopeng <[email protected]> wrote: > > > >> but this app does not use the admin app. > > > > >> On Dec 27, 12:33 am, mdipierro <[email protected]> wrote: > > > > >> > admin is not supposed to run on GAE because GAE does not allow you to > > > >> > write on filesystem. > > > > >> > You can make it work with minor tweaks but it would be useless > > > >> > because > > > >> > of the limitation above. > > > > >> > Massimo > > > > >> > On Dec 26, 10:13 am, zhaopeng <[email protected]> wrote: > > > > >> > > Hi All, > > > >> > > a small app works fine on web2py's default host server.but when it > > > >> > > runs on gae's dev_appserver,it account an issue: > > > >> > > Internal error > > > >> > > Ticket issued: unknown > > > >> > > admin disabled because unable to access password file > > > >> > > maybe it because i use session.token==1(or 0) to check whether the > > > >> > > user has login. > > > >> > > Is there some method to avoid the issue. > > > > >> > > Thanks, > > > >> > > Peng > > > > note1.2.tar > > > 498KViewDownload > > > > [log_on_gae.txt2K ]207 "http://web2note.appspot.com/note/note/index" -W > > > 12-26 09:17AM 45.598 > > > no file lockingD 12-26 09:17AM 45.935 > > > no sqlite3 or dbapi2 driverD 12-26 09:17AM 45.939 > > > no MySQLdb driverD 12-26 09:17AM 45.942 > > > no psycopg2 driverD 12-26 09:17AM 45.947 > > > no cx_Oracle driverD 12-26 09:17AM 45.949 > > > no MSSQL driverD 12-26 09:17AM 45.960 > > > no kinterbasdb driverD 12-26 09:17AM 45.964 > > > no informixdb driverW 12-26 09:17AM 46.002 > > > unable to import dbhashW 12-26 09:17AM 46.008 > > > unable to import py_compileW 12-26 09:17AM 46.186 > > > unable to import wsgiserverW 12-26 09:17AM 47.027 > > > no cache.diskE 12-26 09:17AM 47.153 > > > Traceback (most recent call last): > > > File > > > "/base/data/home/apps/web2note/1.329967197348459447/gluon/restricted.py", > > > line 62, in restricted > > > exec ccode in environment > > > File > > > "/base/data/home/apps/web2note/1.329967197348459447/applications/note/controllers/note.py:listnote", > > > line 29, in <module> > > > File > > > "/base/data/home/apps/web2note/1.329967197348459447/gluon/globals.py", > > > line 55, in <lambda> > > > self._caller=lambda f: f() > > > File > > > "/base/data/home/apps/web2note/1.329967197348459447/applications/note/controllers/note.py:listnote", > > > line 16, in listnote > > > File > > > "/base/data/home/apps/web2note/1.329967197348459447/gluon/contrib/gql.py", > > > line 210, in __eq__ > > > def __eq__(self,value): return SQLQuery(self,'=',value) > > > File > > > "/base/data/home/apps/web2note/1.329967197348459447/gluon/contrib/gql.py", > > > line 329, in __init__ > > > self.get_one=QueryException(tablename=left._tablename,id=long(right)) > > > TypeError: long() argument must be a string or a number, not 'NoneType' --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

