News for hackers. Stuff that matters.
Re:The M in MVC: Why Models are Misunderstood and Unappreciated by whalesalad on Tuesday July 26, 2011 @05:04AM (#2806593)
YES! I am exhausted from a long run and cannot articulate my thoughts clearly but just as an example, I try and overload my Django models with as much logic as I possibly can. Add tons of functions for fetching attributes, use @property(s) and make use of custom managers or queryset subclassing when you can. If you spend the time to "fatten" (as this article mentions) up your models, your views and the actual nitty-gritty glue holding your app together will be MUCH simpler and easier to follow. Let your models do the heavy lifting!

There are no comments on this comment yet.