PyCharm 2023.2 latest changes

PyCharm 2023.2 latest changes

PyCharm 2023.2 is a feature A powerful Python integrated development environment that provides Python developers with many new features and improvements. This tutorial will introduce the latest changes in PyCharm 2023.2, including Django support, Black formatter integration, AI Assistant, Run Anything, GitLab integration, etc., to help novice programmers quickly master the use of PyCharm 2023.2. Today we mainly introduce the latest version of Django support:

  • Django support: PyCharm 2023.2 adds a number of live templates for Django forms and models, making it possible to quickly insert commonly used Django code snippets by entering short abbreviations. Additionally, PyCharm 2023.2 supports the Django REST framework’s endpoint tool window with the ability to search, navigate, and rename endpoint declarations, as well as complete URLs via canonicalization in HTTP clients.

Django support

PyCharm 2023.2 provides more conveniences for Django developers, including the following two aspects: Before learning, you can download PyCharm for free activation through the link: Script download

Live template

Live Templates is a feature that allows you to quickly insert frequently used code snippets by entering abbreviations. PyCharm 2023.2 expands Django’s list of live templates to include the following categories:

  • Django view: You can enter dv, dvc, dvr, dvg, dvp > and other abbreviations, quickly create Django’s view functions, class views, redirect views, general views and path views.
  • Django form: You can quickly create Django form classes, model form classes and form controls by entering abbreviations such as df, dfm, dfc.
  • Django model: You can quickly create Django model classes by entering dm, dma, dmf, dmc, etc. Model abstract base class, model fields, and model methods.

To use a live template, you only need to open a .py file in PyCharm, then enter the abbreviation in the appropriate position and press the Tab key to automatically insert the corresponding code snippet. You can also use the Tab key and Shift + Tab key to jump to different placeholders in the code snippet and fill in the content you need. For example, if you type dvg and then press the Tab key, you will get the following code snippet:

python
Copy code
from django.views.generic import View

class MyView(View):
    def get(self, request, *args, **kwargs):
        # TODO: write your code here
        return None

You can enter the name of your view class in the placeholder after class, then write your business logic in the get method, and finally return a suitable response object .

PyCharm 2023.2 provides a number of live templates for Django, which you can view and modify in Editor | Live Templates | Django in the settings. You can also customize your own live templates, or import live templates shared by others from the PyCharm Live Templates Repository.

Endpoint tool window

The Endpoint Tool Window is a tool that allows you to view and manage all endpoints in your Django REST Framework project. You can find it in the lower right corner of PyCharm, or open it via View | Tool Windows | Endpoints. The interface of the endpoint tool window is as shown below:

In the Endpoints tool window, you can see a list of all endpoints defined in your project, along with information such as their HTTP methods, URLs, view functions, and serializers. You can jump to the corresponding code location by clicking on the endpoint’s name or icon. You can also rename the endpoint by right-clicking the endpoint and selecting Rename, and PyCharm will automatically update all references in the code. In addition, you can test the functionality of your endpoint by sending a request in PyCharm’s built-in HTTP client by right-clicking the endpoint and selecting Run in HTTP Client. You can use canonical completion of the URL in the HTTP client, i.e. enter $ in the URL, then select the endpoint you want and PyCharm will automatically fill in the full URL. For example, if you enter $api/users/ and then select the UserList endpoint, PyCharm will automatically fill in http://localhost:8000/api/users/ .

The endpoint tool window can help you quickly search, navigate and rename endpoints in your Django REST framework project, improving your development efficiency. You can adjust the configuration options of the endpoint tool window in Tools | Endpoints in the settings, such as the displayed endpoint type, sorting method, etc.

Summary

PyCharm 2023.2 is a version worth looking forward to. It brings many new features and improvements, especially real-time templates for Django forms and models, which facilitate developers and greatly improve developer efficiency.

Digression

In this era of rapidly growing technology, programming is like a ticket to a world of infinite possibilities for many people. Among the star lineup of programming languages, Python is like the dominant superstar. With its concise and easy-to-understand syntax and powerful functions, Python stands out and becomes one of the hottest programming languages in the world.


The rapid rise of Python is extremely beneficial to the entire industry, but “There are many popular people and not many people“, which has led to a lot of criticism, but it still cannot stop its popularity. development momentum.

If you are interested in Python and want to learn Python, here I would like to share with you a Complete set of Python learning materials, which I compiled during my own study. I hope it can help you, let’s work together!

Recommended learning resources

In addition to the above sharing, if you also like programming and want to get a higher salary by learning Python, here is a Python learning material to share with you.

Here I will show you the part-time job group I joined and the screenshots of recent orders I received.

Part-time group

private order

If friends are in need, you can scan the QR code below to get in touch, or you can recommend to the part-time group~

Learning Python well is good whether you are getting a job or doing a side job to make money, but you still need to have a learning plan to learn Python. Finally, we share a complete set of Python learning materials to give some help to those who want to learn Python!

### 1. Python learning route

image-20230619144606466

python learning roadmap 1

2.Basic learning of Python
01. Development tools

02. Study Notes

03. Learning video

3. Essential manual for Python beginners

image

4. A complete set of data analysis resources

5.Python interview highlights
01.Interview materials

02. Resume template

Due to limited space, only part of the information is shown. Add it above to get it

—— ?♂? This article is reproduced from the Internet. If there is any infringement, please contact us to delete it ?♂? ——