Web Framework

Created on Sept. 21, 2012, 2:54 p.m. by Hevok & updated by Hevok on May 2, 2013, 5:22 p.m.

Django is the "The web framework for perfectionists with deadlines."

What is a web framework? In analogy to LEGO. Imagine C code is the plastic of which LEGO is made of. Its hard to built something useful with raw plastic. Python code are the individual blocks/bricks. Many blocks together can be combined to construct, for instance, a multifunctional unit such as a building which is analogous to a web framework as it does all the repetitive boiler code (which each house has, like roof, doors, windows) and can easily be extended by adding additional functionality to it (e.g. helicopter landing platform). Django has a very vital community and is one of the few projects where one can happily run production sites on trunk, upgrading every Tuesday.

Django is now a widely-used, general-purpose framework and has a responsibility to promote good coding practices.

Django is more than a web-framework; it is an ecosystem of pluggable components.

Notable, it has many batteries included of which are database access through object relational model and form processing are just two parts from a whole bunch.

Make models, design urls, prepare views, and create templates

Start with modelizing the problem. Here comes in the models that are representing the database structure. Urls are basically are mapping from the address bar to specific views (interpretations of the world). Django tries to understand the users request through recognizing the urls and the associated string data by passing this to the correct view. Django receives http request, get/post data through the views. Within the specific view data gets processed in such a way that it is able send/store the right information. Lastly the send information gets rendered in the templates which generate the web pages dynamically.




Tags: tutorial, coding
Categories: Tutorial
Parent: Tutorials
Children: Accessing both Directions of ManyToManyFields, Adding a Request Slug to a Generic Class View, Application, Apps, Breadcrump, Cache, Celery, Clearing Cache, Code Review, Combining Querysets, Decorating 3rd party app's views, Default ForeignKey, Direct to Template, Distribution, Django, Django Dumpdata, Editing Form Data, Forms, Generic vs. Integrated app, Graceful Restart, HTML, HTML Escape, Include, Indexing, Install Django, List and Detail View for Data Tags, Mixins, Multi-Dimensional Scale, Omitting Template Tag, OnChange, Optional Unicode Return Values, Passing Python Data to JavaScript, Printing in Templates, Project, Project Path, QuerySet, Redirection, Referencing Model Instance Fields Dynamically, Rendering Tables, Retrieving the Last Object, Saving ManyToMany Relationships, Scaling, Searching, Sending Translated Messages, Serving Media, Sorting in Admin, South, Static Files, Submitting Data via a Form, Swappable Models, Template Tags & Filters, Translating Strings

Update entry (Admin) | See changes

Comment on This Data Unit