What does django controllers are in views.py -
i have followed several django tutorials. not know why controllers stored in file called views.py. confuse filename. looking mvc development. there other files in django "real" controllers ?
yes ! it's design decision , it's described guys behind django here.
basically argument that, in opinion,
in our interpretation of mvc, “view” describes data gets presented user. it’s not how data looks, data presented. view describes data see, not how see it. it’s subtle distinction.
a “view” python callback function particular url, because callback function describes data presented.
i entice read entry hold of overal idea behind views naming.
about controllers, yes again. though, can define several layers of called middlewares in django handle lots of static logic before/after requests handled views, still, it's view plays main role of controller in django.
Comments
Post a Comment