As you likely know this is near a religious war type of issue -- where
to separate controller/view.

My take on the issue is while it's a good idea to keep
controller/domain/etc. logic out of the view [templates], building a
table (as in your example) is a view function and reasonable to handle
in the view. I'd tend to give the view access to the 'client' objects
or perhaps a bit safer create tuples/lists with the needed fields and
pass those to the view.

This way you can handle view logic if you need to; say a certain type
of client -- maybe a new client, can be highlighted differently in the
result listings. I think an `if` bit of code in the template setting
CSS classes is a perfectly reasonable use of "code in the view".

Overall the decision is best made based on your particular situation --
working with people who don't know python, or just coders who hate HTML
and only coders will ever change it, etc.

I'm sure there are 1000's of other opinions on the topic....


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss
-~----------~----~----~----~------~----~------~--~---

Reply via email to