On Jan 1, 6:34 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
> On Jan 1, 9:48 am, pihentagy <pihent...@gmail.com> wrote:
> The sytnax is Field(name, type). The default type is a string. If you
> want it to be a reference it has to said explicitly. You do the same
> in Django. The validator is optional and, in fact, since 1.74 you get
> that validator by default if web2py knows how to represent a partner.
> For example
>
>     db.define_table('partner',Field('name'),format='%(names)s')
>     db.define_table('whatever',Field('partner',db.partner))

Hm so getting referential integrity only when the system can _display_
some type of record? Again, I see a problem here: validator should
really care about validity, and representation should be another
thing.

And if we are representation: if web2py renders a mandatory FK as a
combobox, there is no dummy 'please select one' option.
The first valid option is selected by default. This causes serious
usability issues, because users will not pay any attention to select a
valid option, because there is something, and it validates.

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.


Reply via email to