﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
31000	Match @import rule and url() statement exclude of the css comment /* */ in the css file source code, during the run collectstatic command	Tomáš Zigo	nobody	"I use some extrenal js lib assets in the my django project (automatically installed by the bower js package manager).

Some css source code has {{{url()}}} statement inside the comment {{{/* */}}} with wrong relatative path to img/font.

During running command {{{python manage.py collectstatic}}} I get error message.
{{{
Traceback (most recent call last):
  File ""manage.py"", line 26, in <module>
    execute_from_command_line(sys.argv)
  File ""/home/test/.local/share/virtualenvs/klub-v-nnivlwsY/lib/python3.6/site-packages/django/core/management/__init__.py"", line 381, in execute_from_command_line
    utility.execute()
  File ""/home/test/.local/share/virtualenvs/klub-v-nnivlwsY/lib/python3.6/site-packages/django/core/management/__init__.py"", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File ""/home/test/.local/share/virtualenvs/klub-v-nnivlwsY/lib/python3.6/site-packages/django/core/management/base.py"", line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File ""/home/test/.local/share/virtualenvs/klub-v-nnivlwsY/lib/python3.6/site-packages/django/core/management/base.py"", line 364, in execute
    output = self.handle(*args, **options)
  File ""/home/test/.local/share/virtualenvs/klub-v-nnivlwsY/lib/python3.6/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py"", line 188, in handle
    collected = self.collect()
  File ""/home/test/.local/share/virtualenvs/klub-v-nnivlwsY/lib/python3.6/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py"", line 134, in collect
    raise processed
whitenoise.storage.MissingFileError: The file 'colorPicker/_blank.gif' could not be found with <whitenoise.storage.CompressedManifestStaticFilesStorage object at 0x7fe6c456c8d0>.

The CSS file 'colorPicker/index.css' references a file which could not be found:
  colorPicker/_blank.gif

Please check the URL references in this CSS file, particularly any
relative paths which might be pointing to the wrong location.
}}}

{{{ url('_blank.gif') }}} statement is inside comment in the css source code.

Problem is that {{{@import}}} rule and {{{url()}}} statement are checked in all css file source code content, include code between css comment {{{/* */}}}.
( regex pattern for the match rule/statement {{{ django.contrib.staticfiles.storage.HashedFilesMixin.patterns}}})

I write patch which match this rule and statement only outside of the css comment in css file source code.

[https://github.com/django/django/pull/12104 PR]"	Uncategorized	new	contrib.staticfiles	2.2	Normal		staticfiles, collectstatic		Unreviewed	1	0	0	0	0	0
