CSS URL inspection fails

In several CSS files I have statements like:
background-image: url(/static/i/link-arrow.png);

With the static directory under my project root. Yet pycharm gives me a red
Cannot resvolve directory 'static'
inspection error.  How can I get pycharm to find my static files?
Comment actions Permalink
Hi Bryce,

Is it a Django application?
Do you have your static directory set in STATICFILES_DIRS field in settings.py?
Comment actions Permalink
Yes, this is django:

    os.path.join(PROJECT_ROOT, 'obviously/static/'),
    os.path.join(PROJECT_ROOT, 'obviously/'), ) #Test PyCharm-1624

But the inspection is unhelpful, not listing the directories it tried to find the file:
Cannot resolve directory 'static' less... (Ctrl+F1) 
This inspection detects inappropriate values assigned to CSS attributes. For example, invalid measurement units or values out of range

Does this work for other people?
Comment actions Permalink
Newest Pycharm 3, old problems. Same issue here, Pycharm is unable to resolve the paths to static files (js/css/img).

Static files from project level static folder:

<link rel="stylesheet" href="{% static 'css/jquery-ui-1.10.3.custom.min.css' %}">
<script type="text/javascript" src="{% static 'js/jquery-ui-1.10.3.custom.min.js' %}"></script>

Pycharm has a little more luck with static files in app folders.
Working with Django 1.5.4

Please sign in to leave a comment.