[Chicago] web2py on appengine. Any testers?

Massimo Di Pierro mdipierro at cs.depaul.edu
Wed Apr 23 08:33:55 CEST 2008


Thanks Cosmin,
I have ported 90% of the web2py ORM on the appengine

now the following code works on both appengine and Oracle/MySQL/ 
PostgreSQL/SQLite

Now in trunk you will find gluon/gql.py create an empty all with this  
controller:

     from google.appengine.ext.db import GqlQuery
     from gluon.gql import *
     response.session_id=None  #disable sessions

     db=GQLDB() # for appengine
     # db=SQLDB(....) # only change for other db back-ends
     db.define_table('pet',SQLField('name'),SQLField('legs','integer'))
     db.pet.name.requires=IS_NOT_EMPTY()
     db.pet.legs.requires=IS_INT_IN_RANGE(0,8)

     def index():
         form=SQLFORM(db.pet)
         if form.accepts(request.vars,session): response.flash='pet #% 
i inserted' % form.vars.id
         pets=db(db.pet.name=='Snoopy').select()
         return dict(pets=pets,form=form)

The code makes a list of dogs called snoopy and an insert form with  
validation and errors on validation.
!!!This needs lots of testing and debugging.!!!

I also implemented update and delete a la web2py

         if len(pets)>3: db(db.pet.name=='Snoopy').update(name='Doggy')
         if len(pets)>3: db(db.pet.name=='Snoopy').delete()

but update does not do anything although I follow the rules and  
delete gives an appengine error I do not understand (BadRequestError:  
All keys must be in the same entity group). Searches involving the id  
do not work. It could also be made more efficient.

Anybody with an account willing to run this on the real thing?s

Massimo

On Apr 23, 2008, at 12:20 AM, Cosmin Stejerean wrote:

> I've never quite made it past the registration screen. Part of the
> reason for asking for a better one is that it got in my way enough
> that I never actually got to testing the software. I'll take a look at
> it now though, I'm waiting for a particularly long build to finish and
> I have some time to kill with registration forms.
>
> - Cosmin
>
> On Tue, Apr 22, 2008 at 10:14 PM, Massimo Di Pierro
> <mdipierro at cs.depaul.edu> wrote:
>> will look into that. Thanks.
>>  How do you find the [folders] and [surveys] part, usability wise?
>>  what API would you like to be exposed via XML RPC?
>>
>>  Massimo
>>
>>
>>
>>  On Apr 22, 2008, at 10:09 PM, Cosmin Stejerean wrote:
>>
>>
>>> I recommend having a register button right on the page (next to  
>>> login)
>>> which when clicked shows a second password box (for confirm) and  
>>> let's
>>> the user in. Don't ask me for my name and email address unless you
>>> really need it.
>>>
>>> - Cosmin
>>>
>>> On Tue, Apr 22, 2008 at 10:02 PM, Carl Karsten  
>>> <carl at personnelware.com>
>> wrote:
>>>
>>>> and your register code would never ever get tested.
>>>>
>>>>  how about you preload the user/pw with random values and have 2
>> buttons:
>>>> "create account and login" and "login'
>>>>
>>>>  now they have 3 choices:
>>>>
>>>>  hit create and use the site
>>>>  enter a user/pw they like and use the site
>>>>  enter a user/pw they have used before and use the site.
>>>>
>>>>  ps, my wineshow web site just went live.  guess what that means?
>>>>
>>>>  Carl K
>>>>
>>>>
>>>>
>>>>
>>>>  Massimo Di Pierro wrote:
>>>>
>>>>
>>>>> If I provide a test username instead of seeing what I want you  
>>>>> to see,
>> you
>>>>>
>>>> see the mess that other people have created before you. ;-)
>>>>
>>>>>
>>>>> On Apr 22, 2008, at 8:25 PM, Cosmin Stejerean wrote:
>>>>>
>>>>>
>>>>>
>>>>>> I did actually notice the register about 30 seconds after I hit
>> send.
>>>>>> I'm still in favor however of providing a test username and  
>>>>>> password
>>>>>> when asking for feedback so people can go right to testing your
>>>>>> software instead of registering.
>>>>>>
>>>>>> - Cosmin
>>>>>>
>>>>>> On Tue, Apr 22, 2008 at 5:36 PM, Carl Karsten
>> <carl at personnelware.com>
>>>>>>
>>>>>
>>>> wrote:
>>>>
>>>>>
>>>>>>
>>>>>>
>>>>>>> *giggle*
>>>>>>>
>>>>>>>  There is a 'register' or something at the top.  hit that, enter
>>>>>>>
>>>>>>
>>>>>
>>>> stuff, hit
>>>>
>>>>>
>>>>>>
>>>>>>> OK, use stuff.  don't even have to wait for a conf email.
>>>>>>>
>>>>>>>
>>>>>>>  Carl K
>>>>>>>
>>>>>>>
>>>>>>>  Cosmin Stejerean wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> username? password?
>>>>>>>>
>>>>>>>> On Tue, Apr 22, 2008 at 4:09 PM, Massimo Di Pierro
>>>>>>>> <mdipierro at cs.depaul.edu> wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>  In a couple of weeks I am going to release a web2py CMS. You
>> can
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>> test a
>>>>
>>>>>
>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>>> beta version here
>>>>>>>>>
>>>>>>>>>  https://mdp.cti.depaul.edu/cms
>>>>>>>>>
>>>>>>>>>  It includes the survey app developed during the Flourish
>> Rumble.
>>>>>>>>>  It is still in beta and I am still planning to add features
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>> before I
>>>>
>>>>>
>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>>> release the source code. Nevertheless I would very much
>> appreciate
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> tests,
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> comments and suggestions.
>>>>>>>>>
>>>>>>>>>  Massimo
>>>>>>>>>  _______________________________________________
>>>>>>>>>  Chicago mailing list
>>>>>>>>>  Chicago at python.org
>>>>>>>>>  http://mail.python.org/mailman/listinfo/chicago
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>  _______________________________________________
>>>>>>>  Chicago mailing list
>>>>>>>  Chicago at python.org
>>>>>>>  http://mail.python.org/mailman/listinfo/chicago
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Cosmin Stejerean
>>>>>> http://blog.offbytwo.com
>>>>>> _______________________________________________
>>>>>> Chicago mailing list
>>>>>> Chicago at python.org
>>>>>> http://mail.python.org/mailman/listinfo/chicago
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Chicago mailing list
>>>>> Chicago at python.org
>>>>> http://mail.python.org/mailman/listinfo/chicago
>>>>>
>>>>>
>>>>>
>>>>>
>>>>  _______________________________________________
>>>>  Chicago mailing list
>>>>  Chicago at python.org
>>>>  http://mail.python.org/mailman/listinfo/chicago
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Cosmin Stejerean
>>> http://blog.offbytwo.com
>>> _______________________________________________
>>> Chicago mailing list
>>> Chicago at python.org
>>> http://mail.python.org/mailman/listinfo/chicago
>>>
>>
>>  _______________________________________________
>>  Chicago mailing list
>>  Chicago at python.org
>>  http://mail.python.org/mailman/listinfo/chicago
>>
>
>
>
> --
> Cosmin Stejerean
> http://blog.offbytwo.com
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> http://mail.python.org/mailman/listinfo/chicago



More information about the Chicago mailing list