2

I have created a simple Django project with one page which included custom css. and noticed that PyCharm can't find a declaration for CSS which located in static folder.

See example: enter image description here

I have the following configuration in settings.py:

STATIC_URL = '/static/'
STATIC_DIR = os.path.join(BASE_DIR, 'static')
STATICFILES_DIRS = [
    STATIC_DIR
]

Please NOTE the file is loading and I can see changes in UI, but PyCharm constantly can't find it So looks like it is some PyCharm configuration problem. Could you please help to solve it?

PyCharm version 2019.2

Roman
  • 1,883
  • 2
  • 14
  • 26
  • I am currently having this same problem. I tried marking my static directory as source root folder. Tried invalidating caches and restart Pycharm but no changes still. See if any of the solutions here will work for you https://stackoverflow.com/questions/49749981/pycharm-cannot-find-declaration-to-go-to/50335132 – Toluwalemi Oct 23 '20 at 01:50
  • I tried, but unfortunately, problem still persist ( – Roman Oct 23 '20 at 05:30

0 Answers0