Does the book actually specifically recommend that all queries go in
controllers? If so, can you point that out, as it should be changed.
No, but in all examples, queries are in controllers, sufficient for a
reader to infer that.
Anyway, nothing about web2py requires you to put queries in
controllers. If it is a single query used in a single action, then
sure, put it in the controller. But if you re-use the same query in
multiple places, of course you should move it to a model or module --
this is the recommended practice.
True, but in addition to what I said earlier, the book even mentioned
I agree that could just as easily go in the view, but I don't see the
harm in having it here.
Because it confuses the designers, who on many occasions not know python
or web2py, this makes a big difference when you are working alone, but
complicated when a third party needs to make changes
--
Este mensaje le ha llegado mediante el servicio de correo electronico que
ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema
Nacional de Salud. La persona que envia este correo asume el compromiso de usar
el servicio a tales fines y cumplir con las regulaciones establecidas
Infomed: http://www.sld.cu/
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
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 [email protected].
For more options, visit https://groups.google.com/d/optout.