Pycharm: “unresolved reference” error on the IDE when opening a working project

前端 未结 7 1849
日久生厌
日久生厌 2020-12-02 18:15

Intro

I have a Python project on a git repository. Everything works ok for most of the team members, we can sync the code and edit it without any pr

7条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-02 18:53

    I also had the problem, and it took me few hours to find the exact solution.

    You need to confirm the following things.

    1. 'django.contrib.staticfiles', is added to INSTALLED_APPS in the settings.py file of your application.

    2. The directory with the static contents (for example, images), named static, resides under the application root.

    Now Do the following

    PyCharm > Preferences > Project Settings > Django

    Make sure your Django Project root, Settings.py and manage.py script are well defined in the dialog box.

    You are good to go. Hope this helps.

提交回复
热议问题