494759579 by Unknown

494759579 by Unknown

Author:Unknown
Language: eng
Format: epub


Figure 8.1: Django Function-based views

At a glance, one can say that the views.py file may contain import statements and view functions. Further, the view functions accept an HTTP request to do some processing and render an HTML template in response to the request. This is a very basic structure of a views.py file. It can contain several view functions or classes. Further, those classes can have several methods and subclasses. Let’s take a look at it in more detail.

Types of views

Based on the definition, there are two types of views: function-based and class-based.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.