How do web templates separate content and logic?

Bruno Desthuilliers bruno.42.desthuilliers at websiteburo.invalid
Wed Jul 2 16:44:23 CEST 2008

TheDarkTrumpet a écrit :
> Another thing I'd like to add on this subject.
> I agree with others here that having logic in the view isn't really a
> bad thing.  I used to think it did, but now I don't think it does as
> much.  I feel that when you're separating out the view, you're giving
> really non-programmers the ability to actually do the content.  That
> doesn't mean that non-programmers can't learn very very basic
> programming logic.  Take, for example, the Django code.  The Django
> template system is a very watered down version of a language.  It
> supports very basic stuff, and I feel that really anyone can pick up
> on it.
> By totally separating out the logic, and using tags, you're adding a
> lot of overhead in my opinion.  It's another file that needs to be
> included, and the logic of how it's displayed on the page is then
> split a bit - between the developer and the designer.  If the designer
> feels that they want only 5 products to show on one page, they should
> be able to change it.
> THis is how I feel on the whole idea anyways.

Yeps. Kirk and you both expressed MHO better than I did... I did the 
half-backed-template Kirk describes a couple times, and what you wrote 
above apply to my own experience with too-dumbed-down templating systems 
that finally make it harder for both the programmer and the designer, 
since a good part of the presentation logic then moves up to the 
controller, which somehow ruins the whole idea.

More information about the Python-list mailing list