程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Django version selection, Python compatibility issues and update time (long-term update)

編輯:Python

The result first

  • LTS is the abbreviation of Long Term Support. It is the stable version of the official long-term maintenance. It is recommended to use the LTS version in the production environment. It is best not to try other versions with minor updates and minor fixes.;
  • LTS is usually updated once in April in odd-numbered years within 2 years, and the maintenance period of a single version is usually 3 years;
  • Django version and Python version selection

Django version

Start maintenance time

Python version

1.11(LTS)

2017.4—2020.4

2.7, 3.4, 3.5, 3.6, 3.7 (added in 1.11.17)

2.2(LTS)

2019.4—2022.4

3.5, 3.6, 3.7, 3.8 (added in 2.2.8), 3.9 (added in 2.2.17)

3.2(LTS)

2021.4—2024.4

3.6, 3.7, 3.8, 3.9, 3.10 (added in 3.2.9)

4.2(LTS)

2023.4—2026.4

3.9, 3.10

django version ID

We need to know in advance about the three version identifiers of django1. How to identify the version number of the function release?The version number is generally in A.B or A.(B+1) format. For example, the 2.x series version has versions 2.1/2.2, which represent the updated version under version 2.The update frequency of these versions is about 8 months, and the updates are basically new functions, improvements to existing functions, etc.2. LTS versionLTS is short for Long Term Support, and a feature release will be designated as a Long Term Support (LTS) release.These releases will have bug fixes that cause security and data loss, and are typically supported for three years.| Django version | Start maintenance time | Python version || --------- | --------------|--------------------------- || 1.11(LTS) | 2017.4—2020.4 | 2.7, 3.4, 3.5, 3.6, 3.7 (added in 1.11.17) || 2.2 (LTS) | 2019.4—2022.4 | 3.5, 3.6, 3.7, 3.8 (added in 2.2.8), 3.9 (added in 2.2.17)|| 3.2 (LTS) | 2021.4—2024.4 | 3.6, 3.7, 3.8, 3.9, 3.10 (added in 3.2.9) || 4.2 (LTS) | 2023.4—2026.4 | 3.9, 3.10 |Generally, the LTS major version is updated once in odd-numbered years within 2 years, basically in April, and the maintenance time of a single version is usually 3 years;3. How to identify the version number of the patch version?The version number is generally: A.B.C format, such as 1.8.18, 1.9.2, etc. The version number represented by the last digit is the patch version.These versions are released to fix bugs or security issues.These versions will be 100% compatible with the relevant major version, so we should keep upgrading to the latest patch version to keep the data intact and secure.In summary, the latest LTS version, and the patch version is also the latest, is the best choice

django version update schedule


Example: The maintenance time of version 1.11(LTS) is from 2017.4 to 2020.4;
The update time of a minor version is usually 8 months. For example, the update time of version 2.1 to 2.2 is from December 2017 to October 2018. The update content of such versions is basically new functions, improvements to existing functions, etc..

Django detailed version and python version comparison table (long-term update)

Django version

Python version

1.11(LTS)

2.7, 3.4, 3.5, 3.6, 3.7 (added in 1.11.17)

2.0

3.4, 3.5, 3.6, 3.7

2.1

3.5, 3.6, 3.7

2.2(LTS)

3.5, 3.6, 3.7, 3.8 (added in 2.2.8), 3.9 (added in 2.2.17)

3.0

3.6, 3.7, 3.8, 3.9 (added in 3.0.11)

3.1

3.6, 3.7, 3.8, 3.9 (added in 3.1.3)

3.2(LTS)

3.6, 3.7, 3.8, 3.9, 3.10 (added in 3.2.9)

4.0

3.8, 3.9, 3.10

4.2(LTS)

3.9, 3.10

Example: The version of django uses 2.2LTS, so it is matched with the interpreter after python3.5

If multiple LTSs are in the cycle at the same time, select the latest LTSIf the latest LTS has passed 1/2, select the current latest version and switch to the next LTS in due course.If the project is running on an LTS, unless there are security holes that cannot be fixed and circumvented, keep using it.Look at the deadline for the official support section of each Django version, and it is best to complete the version switch 1 year before the deadline.If new to Django projects, Django 3.2 is recommended, officially supported until 2024.

Install

pip3 install django==2.2 # Execute this command on the command line

Reference:
Official: https://docs.djangoproject.com/en/4.0/faq/install/
https://zhuanlan.zhihu.com/p/151364417
https://www.zhihu.com/question/308080248

Let me introduce myself first. The editor graduated from Shanghai Jiaotong University in 2013. I worked in a small company and went to big factories such as Huawei and OPPO. I joined Alibaba in 2018, until now.I know that most junior and intermediate java engineers want to upgrade their skills, they often need to explore their own growth or sign up to study, but for training institutions, the tuition fee is nearly 10,000 yuan, which is really stressful.Self-learning that is not systematic is very inefficient and lengthy, and it is easy to hit the ceiling and the technology stops.Therefore, I collected a "full set of learning materials for java development" for everyone. The original intention is very simple. I hope to help friends who want to learn by themselves but don't know where to start, and at the same time reduce everyone's burden.Add the business card below to get a full set of learning materials


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved