Reference fields are long integers. >>> a = 1 >>> print a 1 >>> print repr(a) 1 >>> b = 1L >>> print b 1 >>> print repr(b) 1L
read more: http://stackoverflow.com/questions/2104884/how-does-python-manage-int-and-long For practical purpose they are the same but with long integers you do not run out of values. On Sunday, 7 April 2013 08:57:39 UTC-5, Spring wrote: > > Hi Anthony, > > I read in the book that "requires' will be set by default for > "list:reference". I tried this, and the output is the same as with > IS_IN_DB(..., > multiple=True), which is a multiple item box listing all options as shown > in the pic below: > [image: Inline image 1] > And I still don't understand why the value of the field is '1L' instead of > '1' as in t_contacts.id.. > > Regards, > Spring > > > On Sun, Apr 7, 2013 at 8:42 PM, Anthony <abas...@gmail.com > <javascript:>>wrote: > >> Field('f_keypersons', type='list:reference t_contacts', requires= >>> IS_IN_DB(db, 't_contacts.id', '%(f_name)s'), >> >> >> For list:reference fields, it should be IS_IN_DB(..., multiple=True). >> Actually, you shouldn't need to set the "requires" attribute explicitly >> anyway because you will get IS_IN_DB(..., multiple=True) as the default >> validator for a list:reference field. >> >> Anthony >> >> -- >> >> --- >> You received this message because you are subscribed to a topic in the >> Google Groups "web2py-users" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/web2py/zZ7LHTCcUUA/unsubscribe?hl=en. >> To unsubscribe from this group and all its topics, send an email to >> web2py+un...@googlegroups.com <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > -- --- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.