[web2py] Inserting into multiple related tables.

2010-03-30 Thread compassiontara
Perhaps I'm missing the obvious, but I can't figure out how to make this work: db.define_table('users', Field('phone','string',unique=True), Field('safe','boolean',default=False), Field('allow_le','boolean',default=False), Field('safe_time','datetime'), Fiel

[web2py] Re: interesting stats

2010-03-05 Thread compassiontara
On Mar 5, 11:03 am, waTR wrote: > Note that more comments doesn't equate to better code. Better code Amen! code must be readable above ALL else. If you have to make it unreadable to a beginning pythonista, then you should document document document! > My strategy is to write a purpose statem

[web2py] Re: Getting out from under web2py.py 's environment building magic.

2010-03-05 Thread compassiontara
On Mar 5, 6:17 am, mdipierro wrote: > On Mar 5, 1:33 am, compassiontara wrote: > > > I'll probably get flamed for talking about this... > > Hope not. You have a very good example. > Just as a side, you do not necessarily need to copy web2py for the > script to work,

[web2py] Getting out from under web2py.py 's environment building magic.

2010-03-04 Thread compassiontara
I'll probably get flamed for talking about this... In general I really like the 'magic' that web2py offers, where it builds a nice structure and imports all the modules and everything. Having stuff just exist for me is really handy! I'm not saying that this should change. However, there are time

[web2py] Re: KeyError on select after an insert()

2010-03-04 Thread compassiontara
gt; db(condition).select(*fields,orderby=..,groupby=...,limitby=...,cache=...,distinct=...) > > On Mar 4, 5:26 pm, compassiontara wrote: > > > Hi everyone.  I'm having an issue with select() working after an > > insert. > > > See below for what I'm doing: > >

[web2py] KeyError on select after an insert()

2010-03-04 Thread compassiontara
Hi everyone. I'm having an issue with select() working after an insert. See below for what I'm doing: zulu ~/web2py % ./web2py.py -S welcome web2py Enterprise Web Framework Created by Massimo Di Pierro, Copyright 2007-2010 Version 1.76.3 (2010-03-03 10:47:17) Database drivers available: SQLite3