Logo F2FInterview

Django Interview Questions

Q   |   QA

The simplest way to look at Django is to break it down into its component parts. First off, there’s a models.py file which defines your data model by extrapolating your single lines of code into full database tables and adding a pre-built (totally optional) administration section to manage content.

The next element is the urls.py file which uses regular expressions to capture URL patterns for processing.

The actual processing happens in your views which, if you haven’t seen the pattern yet, live in views.py. This is really the meat of Django, since views are where you grab the data you’re presenting to the visitor.

Here’s what happens when a visitor lands on your Django page:

  1. First, Django consults the various URL patterns you’ve created and uses the information to retrieve a view.
  2. The view then processes the request, querying your database if necessary.
  3. The view passes the requested information on to your template.
  4. The template then renders the data in a layout you’ve created and displays the page.

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: