On Friday, September 7, 2012 3:21:30 PM UTC-4, luckysmack wrote:
>
> But see, to me, now that's putting HTML in the controller. Which I see as 
> a negative. Ideally I would pass the data to the view and use a foreach 
> over the data contents. And for marking a field as red, I would put some 
> metadata into the data sent to the view. I would just test if vacant was 
> true, and if so, change style. This way there's no hidden HTML 
> tags/structure from a designers template file.
>
It probably depends on who's doing the work. Note, though, you can use the 
HTML helpers in the view as well, so the HTML structure won't be hidden 
there. A designer who is comfortable creating Python for loops and 
inter-mixing Python template code with HTML could probably also get 
comfortable working with the HTML helpers as well. HTML is probably 
preferable in most cases, but there are cases where working with the 
helpers can make the code a lot simpler.

Anthony

-- 



Reply via email to