Sure. db.py:
db.define_table('post', Field('title',length=256), Field('body','text',requires=IS_NOT_EMPTY()), Field('author',db.auth_user), ) db.define_table('comment', Field('post',db.post,writable=False,readable=False), Field('author',db.auth_user,writable=False,readable=False), Field('body','text',requires=IS_NOT_EMPTY())) In the example I provided, in the appadmin of comment, auth_user is displayed as a dropdown. I would like to do that for comment.post also. The format option make it possible to hack up some fields of the database, but it is not so flexible to display for eg. computed values of the post table. thanks in advance Gergo +-[ Gergely Kontra <pihent...@gmail.com> ]------------------+ | | | Mobile:(+36 20)356 9656 | | | +- "Olyan lángész vagyok, hogy poroltóval kellene járnom!" -+ On Thu, Jan 7, 2010 at 16:35, mdipierro <mdipie...@cs.depaul.edu> wrote: > Hi Gergo, > > appadmin has nothing to do with t2 and t2 was deprecated long ago. > > I guess you can still define db.post.represent but I am not sure what > do you want to do with it. What behavior do you expect? Can you > provide a concrete example? > > > On Jan 7, 9:31 am, "KONTRA, Gergely" <pihent...@gmail.com> wrote: >> Yes, AFAIK appadmin is a T2 thing. >> >> So, I wonder how can one rewrite the line below using >> db.post.represent (still that is more flexible) >> >> db.define_table('post', >> Field('title',length=256), >> Field('body','text',requires=IS_NOT_EMPTY()), >> Field('author',db.auth_user), >> format='%(title)s') >> >> db.post.represent = ? >> >> thanks >> Gergo > > -- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to web...@googlegroups.com. > To unsubscribe from this group, send email to > web2py+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > > >
-- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.