Develop locally using pycharm and synchronize to the server in real time

This tutorial uses python 3 and dajngo as an example



open pycharm

file -> new project... -> popup


click django


location is the local path of the newly created project

project interpreter project interpreter -> I chose python 3.6 here

more settings  


The application name is the name of the app file under this project. I will use the app as an example here.


The pop-up window is as follows


OK to open in a new window

The project directory on the left is as follows (pycharm automatically generates many files)


click tool


Under deployment -> configuration, the following interface pops up


Click the green plus sign in the upper left corner to pop up the following window


name is the name of this server

after deciding


under connection

SFPT host is the ip address to be synchronized

port port number

user name is the user name to log into the server

password is the password to log in to the server


After filling out

Click on test SFPT contention...

If the successful style window pops up, it means the setting is successful


same


local path local path

deployment path on server server path

OK when done


After clicking autonmatic upload, you can directly ctrl+s every time you can synchronize the file currently being edited to the server

You can also right-click on projects and files


Click upload to ~~ to upload all files in the current directory to the server



When you create one more file in pycharm, after uploading the file to the server, after deleting the file locally, and uploading the project file again, the file will not be overwritten, the file will always be on the server, you can use the xshell command to connect server delete

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325717762&siteId=291194637