﻿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
28565	Collectstatic raises error when trying to ignore files with glob wildcards	Daniel Wiesmann	nobody	"I got an unexpected error when trying to ignore a file pattern in subdirectories when using the collectstatic command. Here is an example that reproduces the error in a new project:

{{{
cd /tmp && django-admin.py startproject proj
echo ""STATIC_ROOT = '/tmp/staticroot'"" >> /tmp/proj/proj/settings.py
echo ""STATICFILES_DIRS = ('/tmp/proj/static', )"" >> /tmp/proj/proj/settings.py

mkdir -p /tmp/proj/static/vendor/lib

touch /tmp/proj/static/vendor/lib/module1.js
touch /tmp/proj/static/vendor/lib/moudle2.js
touch /tmp/proj/static/vendor/lib/moudle3.js
touch /tmp/proj/static/vendor/lib/moudle4.js

/tmp/proj/manage.py collectstatic --no-input -i **/vendor/**/*.js
}}}

The first time running the collectstatic command, it gives no error but collects the js files in /static/vendor/lib, the second time running this command gives the follwoing error message:

{{{
$ /tmp/proj/manage.py collectstatic --no-input -i **/vendor/**/*.js

usage: manage.py collectstatic [-h] [--version] [-v {0,1,2,3}]
                               [--settings SETTINGS] [--pythonpath PYTHONPATH]
                               [--traceback] [--no-color] [--noinput]
                               [--no-post-process] [-i PATTERN] [-n] [-c] [-l]
                               [--no-default-ignore]
manage.py collectstatic: error: unrecognized arguments: staticroot/vendor/lib/moudle2.js staticroot/vendor/lib/moudle3.js staticroot/vendor/lib/moudle4.js
}}}
"	Bug	closed	contrib.staticfiles	1.11	Normal	invalid	staticfiles ignore pattern		Accepted	0	0	0	0	0	0
