hi,

is there a way to have represent of list:reference field?
e.g.
models
db.define_table('book', 
Field('title'),
Field('cover', 'upload'),
format = '%(title)s')

db.define_table('course', 
Field('course_name'),
Field('description', 'text'),
Field('book', 'list:reference book'),
Field('lecturer', 'list:reference lecturer'),
Field('price', 'decimal(10,2)'),
format = '%(course_name)s')

db.define_table('registration', 
Field('registration_no'), 
Field('registration_date', 'date'), 
Field('student', 'reference student'),
Field('course', 'reference course'),
Field('price', 'decimal(10,2)'),
Field('registration_fee', 'decimal(10,2)'),
Field('total_price', 'decimal(10,2)'),
format = '%(student)s %(course)s')

controllers
def print_registration():
    header = db(db.registration.id == request.args(0)).select().first()
    return dict(header = header)

views
{{=header.course.book}}

it return
[1L, 2L]

how can show the other table field name (book title in registration) for 
example :
learning japanese language for beginner, japanese language daily 
conversation?

thanks and best regards,
stifan

-- 
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 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to