On Sat, Jan 3, 2009 at 12:40 AM, billf <billferr...@blueyonder.co.uk> wrote:

> .......
>
> Just to clarify - when I say 'comment' I am referring to what SQLFORM
> calls 'col3'.  Am I correct when I say that the model doesn't
> currently have a comment/cols3 attribute?  It is just something passed
> to SQLFORM.  In my changes, I re-named 'col3' as 'comment' and have
> used that name like everyone would know what I meant - sorry.


hmmm.... I'm not that saavy around all this, but you can have:

db.t2_person.name.comment= T('Required')

and Required will appear in (?) col3 for 'name'

(see, for example,
http://bazaar.launchpad.net/~mdipierro/web2conf/devel/annotate/head:/models/db.py)<http://bazaar.launchpad.net/~mdipierro/web2conf/devel/annotate/head:/models/db.py>

That's what I was referring to when I said "lablel" and "comment"  on a db
column.

> I see these as distinctly separate topics.
> >
> > That is:
> >
> > - There is more to the form/shape of data - that is the model - than just
> > data table definitions (e.g. there are constraints, descriptors, etc.);
> >  discussion of ways to represent this is one topic;
>
> I agree that the model is more than db tables - I think of it as the
> 'business model' and hence stuff like validation rules should be
> there.


yeah, this requires a little care - distinction between database level
validation, and business logic - controller stuff being driven by what the
business wants, model level validation being driven by what the data layer
needs for consistency.

....

>
> I would like a separate discussion re different forms of output (xml,
> csv, etc) and how to generate them in a similar way to how html is
> generated, i.e. with the ability to include logic but outside the
> controller function.

...

I think this is a good, rational focus:  logic driven by presentation needs
(e.g. what you need for HTML; what you need to generate csv;  what you need
to generate pdf;  etc. etc.)  versus what is desired by the "business",
 e.g. "I don't want them to generate PDF coupons unless they're a manager".

I look forward to seeing what you produce in this.  If you want some help.
you could make a branch on either launchpad or bitbucket.  That would make
it easy to test, comment.

Regards,
Yarko

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@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