3 ms·
For me the hardest thing about Django was comprehending that the 'View' is doing most of the work. * urls point to views * views do stuff. Perhaps hard, manly
by nailer 17y ago
For me the hardest thing about Django was comprehending that the 'View' is doing most of the work.
* urls point to views
* views do stuff. Perhaps hard, manly stuff. Perhaps involving models. Django views have hard, beefy beceps. They're awfully controlling.
* the view passes a dict of results to the template, which is sent as a response to the browser.
Once you get that, it's not so hard.
- ulf 17y agoActually, if you apply the MVC paradigm, the Django View is a mix of View and Controller. Admittedly a little confusing
- scorpion032 17y agoHence, it is defined as MTV.
- BerislavLopac 17y agoSometimes I wonder if they renamed the pattern just to keep up the music theme...
- nailer 17y agoSame here - MTC would have been simpler to understand for me.
- djb_hackernews 17y agobut Google thinks its MVT. http://www.google.com/search?q=django+mvt http://www.google.com/search?q=django+mvt http://www.google.com/search?q=django+mtv http://www.google.com/search?q=django+mtv
- scorpion032 17y agoA perfect tl;dr.
- riffer 17y agoPerfectly stated. I still have the piece of paper from a couple of years ago where I drew this out (I'm both analytical and spatial/visual), and my holistic diagram looks just like what you wrote. At the risk of being negative, I think the real issue is that the extensive documentation is geared more towards designers than hackers.
- FraaJad 17y agoI am far far away from being considered a designer and I consider the Django documentation to be excellent for programmers. Just because it also caters to designers, the documentation is not necessarily watered down.
- sidmitra 17y agoActually i would prefer it if models do most of the major work. And views to convert them into a format suitable for presentation. Sometimes that not possible, but it just feels cleaner and more manageable if it is.