Django for Designers/Basic views: Difference between revisions
Content added Content deleted
imported>Paulproteus (→Static files: Karen-ifying these TODOs) |
imported>Paulproteus (→M-V-C separation concept: Make the image not link) |
||
Line 19: | Line 19: | ||
When you write a Django app, your code is organized in a fashion reminiscent of a well-known design pattern known as MVC, short for ''model, view, controller''. Django's precise organization methodology is based on ''models'', ''views'', and ''templates''. |
When you write a Django app, your code is organized in a fashion reminiscent of a well-known design pattern known as MVC, short for ''model, view, controller''. Django's precise organization methodology is based on ''models'', ''views'', and ''templates''. |
||
[[File:mtv-diagram.png|400px|Django architecture flowchart]] |
[[File:mtv-diagram.png|400px|Django architecture flowchart|link=]] |
||
For Django, a ''model'' represents how the data is stored. This is the part of your app that ties your data to storage in a database. You write Python code, and Django converts it and out of into SQL, the language spoken by databases. |
For Django, a ''model'' represents how the data is stored. This is the part of your app that ties your data to storage in a database. You write Python code, and Django converts it and out of into SQL, the language spoken by databases. |