Hi All,
I have looking though the group for and answer on this, I am try to get the
product_name and batch_no from the product table to be the product in the
stock task table.
But getting the following traceback:
Traceback (most recent call last):
File "/home/tony/web2py/gluon/restricted.py
Say I have a table like this:
db.define_table('person', Field('first_name'), Field('last_name'),
format='%(first_name)s %(last_name)s'
Now if I build a new table:
db.define_table('key', Field('person_id', 'reference person',
requires=IS_IN_DB(db, db.person, label=db.person._format)))
My new t
I defined 2 tables as follows:
db.define_table('offer', Field.Virtual('title', title_func)
> db.define_table('discussion', Field('offer_id', reference offer)
With title_func() a function that builds a string based on other fields in
the 'offer' table.
db.offer.format = '%(title)s
Now when I
I just implemented record representation such as the table below. My
question is, is record representation supposed to save the value in the
database? I am trying to create a price override field in my product table
because the price can be changed within the series of a product (on the
series
in *db.py*
db.define_table('mountains',
Field('m_id','integer', required=True),
Field('pos','integer'),
Field('x','integer'),
Field('y','integer'),
format='(%(x)s %(y)s)',
)
db.define_table('dungeons',
Field('d_id','integer', required=True),
Field('mountain', 'referenc
hi,
did anyone know how to show record representation format that refer to
another table and that table is refer to another table?
e.g.
*db.py*
db.define_table('branch',
Field('address', 'text'),
Field('zip'),
Field('city'),
Field('country'),
Field('phone'),
Field('fax'),
On 20 July 2011 14:09, Johann Spies wrote:
>
> I use this:
>
>
> db.define_table('akb_doccenter_location',
>
> Field('location'))
>
>
Apologies, I did not complete the message before sending: the model includes
a Field(uuid), obviously.
Regards
Johann
--
May grace and peace
On 9 July 2011 03:47, niknok wrote:
> **
> I have another unique column in my table that I would like to use as index
> for record representation. How do I tell web2py to use another index?
>
> Ttrying to use like:
> db.mytable.thisfield.represent = lambda id: db.other(myidx).thatfield
>
I
I have another unique column in my table that I would like to use as
index for record representation. How do I tell web2py to use another
index?
Ttrying to use like:
db.mytable.thisfield.represent = lambda id:
db.other(myidx).thatfield
9 matches
Mail list logo