Just access the .default attribute of each field.
Anthony
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subsc
ok cool,
so now we know how to iterate through the fields of a table. how can we
grab or get the db.py default value for each field also?
thanx lucas
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.googl
ok, got it. Thanks Anthony!
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"w
>
>> for tablename in db.tables:
>> table = db[table]
>>
>
> should this be table = db[tablename] ?
>
Yes, thanks. I updated the original answer.
Anthony
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://c
On Wednesday, October 28, 2015 at 9:39:52 AM UTC-7, Alex Glaros wrote:
>
> I want to discover the field names in db.py (I do not have them listed in
> an already-existing table)
>
> can you help with syntax for a query?
>
> query = ((db.tables.field == 'organizationID') & (db.tables.field ==
>
You can't do a query looking for tables -- you have to handle that part of
it in Python with code like I showed. Once you have the table names, you
can then do whatever queries you want.
Anthony
On Wednesday, October 28, 2015 at 12:39:52 PM UTC-4, Alex Glaros wrote:
>
> I want to discover the f
On Wednesday, October 28, 2015 at 6:35:27 AM UTC-7, Anthony wrote:
>
> Are you saying you have a "tables" table in your db that stores all the
> table and field names of the other tables in your db, and you need to know
> how to query it to get particular information, or are you looking for a w
I want to discover the field names in db.py (I do not have them listed in
an already-existing table)
can you help with syntax for a query?
query = ((db.tables.field == 'organizationID') & (db.tables.field ==
'last_name') & (db.tables.table_name.organizationID == 'California')) # so
search is l
Are you saying you have a "tables" table in your db that stores all the
table and field names of the other tables in your db, and you need to know
how to query it to get particular information, or are you looking for a way
to loop over all the tables you have defined and identify those that
inc
9 matches
Mail list logo