Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I like not having a lot of heavy code inside my templates. The only stuff I do there is displaying values, formatting, and some simple logic. Isn't this one of the core principles of MVC?


Exactly. Having a "watered-down template language" is a good thing.


The problem is arguably that the indirection is really, really costly. Just today I wrote a custom template tag I needed in order to factor out some functionality common to every view on my application. In RoR it would have been maybe 2 lines, but that custom tag was more like 15.

I still adore Django for its efforts to remove all the "magic" code, though.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: