We have had problems with things being sorted in reversed order on GAE
before. I looked at the web2py and it is correct. I believe this is a
GAE bug.

@Robin, can you confirm?

Massimo

On Mar 30, 1:15 pm, Joseph Jude <[email protected]> wrote:
> I have this db definition:
>
> db.define_table('status',
>                                 SQLField('name'),
>                                 SQLField('sort_order', 'integer'))
>
> I've inserted sample values like:
>
> if len(db().select(db.status.ALL)) == 0:
>     db.status.insert(name='New', sort_order=1)
>     db.status.insert(name='Assigned', sort_order=2)
>     db.status.insert(name='Open', sort_order=3)
>     db.status.insert(name='Work In Progress', sort_order=4)
>     db.status.insert(name='Closed', sort_order=5)
>
> Then in the controller:
>
> status_values={}
> for status in db().select(db.status.ALL,
> orderby=db.status.sort_order):
>     status_values[status.id]=status.name
>
>     form=FORM(TABLE(TR("Status:", status_values.values()[0])))
>
> When I run this as web2py, I get New; but when I run this in google
> appengine, I get Closed. I am not able to figure this out. Can anyone
> help me?
>
> I want to display the first value.
>
> Thanks,
> Joseph
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to