Skip to content

Using pycharm

This section is for using pycharm.

Requirements:

  • Pycharm

  • Finished Setting up the project

Setup interpreter

  1. Go to file -> setting -> Project -> Project Interpreter -> click cog -> add
    Project Interpreter

  2. Go to ssh interpreter -> Fill the form like below
    Project Interpreter

  3. Click next and fill docker as password
    Project Interpreter

  4. Click next and change interpreter like below and click finish
    Project Interpreter

  5. After finish, it will show all package like below.
    Project Interpreter

  6. 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.
    Project Interpreter

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.

  1. Click "Add configuration" like in the cursor in the image below. (top-right)
    Project Interpreter

  2. There will be a popup, and click +, then click django server like below
    Project Interpreter
    Project Interpreter

  3. It will show the form and fill like below.
    Project Interpreter

  4. Don't click the OK yet, but click Environment Variables and add environments like below 9by clicking + button).
    Project Interpreter

  5. After that, click OK.

  6. Now we need to run the server by clicking go button in below image.
    Project Interpreter

  7. When we click the go button, pycharm will run a process until like image below.
    Project Interpreter

  8. 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

Back to top