Home > Backend Development > Python Tutorial > Django implements universal views through classes

Django implements universal views through classes

巴扎黑
Release: 2017-07-24 13:44:25
Original
1119 people have browsed it

This week is my first week of employment. On the first day of employment, I saw the project code of the Jiaxing boss. There are class methods in views and I'm confused.

Reminiscent of the previous phone interview at Beijing Rong 360, which asked me if I had ever written a class method... It seems that it is necessary to understand the class method of the view. I searched a lot on the Internet, and it turned out that this It is the so-called "universal view".

I go to work every week, and I only work for 5 days this week; so I go to bed very late in the morning. I don’t seem to have much time to write a detailed blog on this aspect, but I will do so when I have time. You can take a look at the reference article below, I think it is also well written.

You can look at my git code. If you have some basic knowledge of Django, such as the basic def view, I believe you can understand it. I also wrote a lot of comments.

GIT URL:

Reference article:

Django class-based universal View

Introduction to class-based views

Django Study Group: Detailed explanation of class-based universal views (1)

django Introductory study planning and material recommendation

The above is the detailed content of Django implements universal views through classes. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template