It is too bad not to be able to define my own fully customized forms
within a view,
operate over them in a controller but still need to have a necessary
relation to a database model !
Logic should be defined in a controller and presentation in a view.
Daniel
> Am I the only one who gets "Firefox can't find the server at
> www.wellbehavedsystems.co.uk" ?
No, you're not. Every time I try to read a document on Bill's website, I
have to flush my DNS cache (note: not my browser cache). I haven't looked
into why, but it's the only site I have to do that with.
Keith
--
Keith Edmunds
+-------------------------------------------------------------------------+
| Tiger Computing Ltd | Helping businesses make the most of Linux |
| "The Linux Specialists" | http://www.tiger-computing.co.uk |
+-------------------------------------------------------------------------+
-wj
<html>
<head><title>Well-behaved Systems</title></head>
<body>
<img src="banner.gif" title="Well-behaved Systems" alt="Well-behaved Systems"/>
</body>
</html>
On Tue, Nov 11, 2008 at 12:13 PM, billf <billf...@blueyonder.co.uk> wrote:
>
http://www.wellbehavedsystems.co.uk/web2py/examples/mvc.html
> Can achipa or Keith or
> anyone who gets the problem try storing the source locally (if they
> can access it at all!) and see if they still get the problem?
The problem (for me, at least) is NOT the page itself, but the DNS entry
for www.wellbehavedsystems.co.uk - I can fix the problem by flushing the
local DNS cache here.
If I get time, I'll try to see why it's happening.
Keith
--
Keith Edmunds
+-------------------------------------------------------------------------+
Yarko
I finally got around to looking at your comments in detail with the
following results.
1) Re labels: I'm not totally convinced by the "labels are model"
argument but my implementation (when it arrives if ever) will use (per
field) 'view label' over 'model label' over 'field name'.
Your argument that model labels overcome obscure field names is, IMHO,
an argument for a new SQLField attribute 'dbname' that allows the
web2py internal fieldname to be different from the actual dbname - I
have suggested this several times and I think it would really help
making legacy tables more readable in code.
2) Comments are not part of the model anyway and I don't see that
replacing the 'col3' passed to SQLFORM with 'comments' passed from the
view is a problem.
3) Still looking at the linkto= suggestion.
4) Got back on the coding horse and hope to have some alpha code
v.soon.
Hi Bill -Sorry - I was sort of in shock when read my own comments (remind me not to right when I'm tired!) - but I am glad you could understand them.
2) Comments are not part of the model anyway and I don't see that
replacing the 'col3' passed to SQLFORM with 'comments' passed from the
view is a problem.I think you are being too literal - comments as used are descriptive, about the intent of the data item, and as such are about "form" not format. I would not change this for now, focus instead on separating out the commitment of data change so that there is explicit controller level control - this is the clearest, most beneficial step. When that's complete, then attack other parts.
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.
> I see these as distinctly separate topics.I agree that the model is more than db tables - I think of it as the
>
> 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;
'business model' and hence stuff like validation rules should be
there.
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.