Using pycharm¶
This section is for using pycharm.
Requirements:
-
Pycharm
-
Finished Setting up the project
Setup interpreter¶
-
Go to file -> setting -> Project -> Project Interpreter -> click cog -> add
-
Go to ssh interpreter -> Fill the form like below
-
Click next and fill docker as password
-
Click next and change interpreter like below and click finish
-
After finish, it will show all package like below.
-
In current page, click path mappings, click + button and put local path to where the project (django-project folder) and remote path is like below. and click oK.
Now the interpreter is done. When we restart the machine, we need to do make up
to run the project.
Setup run configuration¶
After the interpreter is done, we need configuration to run the project in development mode.
-
Click "Add configuration" like in the cursor in the image below. (top-right)
-
There will be a popup, and click +, then click django server like below
-
It will show the form and fill like below.
-
Don't click the OK yet, but click Environment Variables and add environments like below 9by clicking + button).
-
After that, click OK.
-
Now we need to run the server by clicking go button in below image.
-
When we click the go button, pycharm will run a process until like image below.
-
Now it is done. We can access the development server in http://localhost:2000/
This development mode is DEBUG mode, and also whenever we change the code, the site will also change in runtime.
For more information how to set up on pycharm, please visit Using a Docker Compose-Based Python Interpreter in PyCharm