Hi all
A crud.select on the object-table does only display the ID of the
corresponding location, and not as expected ( '%(id)s: %(country)s,
%(city)s, %(street)s, %(name)s' ).
What is wrong here? Do I have to restart the webserver if I change the
format part of define_table?
Cheers
-Luca.
db.define_table('object',
Field('name'),
Field('description', 'text'),
Field('location', db.location),
format = '%(name)s',
singular = 'Object',
plural = 'Objects')
db.define_table('location',
Field('name', 'string', required=True, notnull=True),
Field('street', length=400),
Field('city', length=40),
Field('country', length=40),
format = '%(id)s: %(country)s, %(city)s, %(street)s, %(name)s',
singular = 'Location',
plural = 'Locations')
def select():
db.object.location.represent = lambda location, row: \
A(location,_href=URL('location', 'update', args=(location.id),
user_signature=True))
db.object.name.represent = lambda name, row: \
A(name,_href=URL('object', 'update', args=(row.id),
user_signature=True))
form = crud.select(table=db.object)
return dict(form=form)