[Fixed]-How to import an existing django project to pycharm

17👍

Open myproject as your project and then go to PyCharm -> Preferences… -> Django, Enable Django Support and then choose your Django project root, settings file and manage script.

3👍

just open pycharm and in file menu select open option.
Then choose your directory and done..!

If you have problem with using command line then you should try building a new project from pycharm itself.

1👍

PyCharm 2022.3.1 (Professional Edition)

Once you opened your project in PyCharm:

File -> Settings -> Languages & Frameworks -> Django -> Enable Django Support

  1. Set "Django project root" to your project’s main folder.
  2. Point "Settings" to where the settings.py file is.
  3. Point "Manage script" to where the manage.py file is.
  4. "Folder pattern to track files" is set to "migrations" on new projects.

Before you apply the settings "Show structure" will be empty. It will get populated once you applay the settings and try opening it again.

0👍

I usually change the run configuration’s working directory option.

You could type your working directory path into that field, then python will find the project’s settings module

👤Neo Ko

Leave a comment