Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Visual Studio Code to realize remote Development of Django

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

Today, I will talk to you about how to use Visual Studio Code to achieve remote development of Django, many people may not know much about it. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.

What is remote development?

To put it simply, we connect to the server with our own computer, and then use our local IDE tools to edit the projects that have been deployed or will be deployed on the server, then I am still based on the Ubuntu system here, using Django development as an example to demonstrate, and locally using Visual Studio Code as the development tool.

What is the basis for learning this article?

There is a Ubuntu system (or a local virtual machine), and Django has been installed on the system and the project has been created. If not, please click to read this article "how to build a Python Django development environment in a pure ubuntu system?", and then read this article.

Visual Studio install SSH FS

To open Visual Studio Code, the first step is to click the icon in the leftmost vertical last box, which is the installation plug-in bar; the second step is to type ssh, and then install the first SSH FS plug-in. Click the first icon to return to the file list interface after the installation is complete.

Press the keyboard F1 key, type ssh in the search box, and select the option in the red box, which means to add a ssh configuration file.

The first Name box means to give your remote host to which you want to connect a name, preferably in the English alphabet, the second is the configuration file, never mind, click Save after the name is set, and then jump to the configuration interface.

As shown in the figure, after configuring the data, click Save to save it, and then there will be an option for SSH FILE SYSTEMS in the lower left corner, at the bottom of the outline.

Right mouse button on the host name you just added, the first option, connect. Is to pull the data, the second Edit... Is to edit the configuration file, after clicking the first pull, the dot on the left will turn green, indicating that the pull is successful, and a list of server files appears on the list, and you can start writing code at this time.

After editing, still right-click on the host name you just added, the first option is to push to the server, the second is disconnected, and the third is to edit the configuration file.

Django project changes key data, such as model, view data modification must restart the web server to take effect. Take apach3 as an example, you need to run the service apache2 restart command.

After reading the above, do you have any further understanding of how to use Visual Studio Code to remotely develop Django? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report