1

I am not able to locate my external javascript and css files when I ctrl click their path string. screentshot

My html template path is 'bodhitree-flipped/concept/templates/concept/content_developer.html'. And my external video.js file path is 'bodhitree-flipped/video/static/video-js/video.js'.

Any Idea how I make pycharm to locate my js files? I know the solution for this is to run python manage.py collectstatic command which will copy all my asset files to /staticfiles folder but I don't want to do it as it will increase the size of my project by duplicating all the static files.

I tried rebuiding the file index with option under File->invalidate caches/Restart... but unfortunately this also doesn't work.

This is how my project structure look like.

project structure

click on the file to see code in settings.py

Any help is deeply appreciated.

5
  • I'm not at my computer atm so can't remember exactly but if you right click the static directory in the file structure there is an option to set the directory as a content root or something like that.. Commented Mar 13, 2016 at 11:55
  • 2
    I have access to my computer, so you can try: Right click -> Mark directory as: -> Resource Root Commented Mar 13, 2016 at 12:14
  • no, it is not working. Commented Mar 13, 2016 at 12:17
  • you have your static root file, etc setup in settings correctly? Commented Mar 13, 2016 at 13:24
  • I don't think we need to change any default settings to enable this feature. Commented Mar 13, 2016 at 13:57

1 Answer 1

1

I have just changed the python template language from jinja to Django (settings->languages and framework->python template languages)and then invalidated the file cache. It worked.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.