#28565: Collectstatic raises error when trying to ignore files with glob
wildcards
-------------------------------------+-------------------------------------
Reporter: Daniel | Owner: nobody
Wiesmann |
Type: Bug | Status: new
Component: | Version: 1.11
contrib.staticfiles | Keywords: staticfiles ignore
Severity: Normal | pattern
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
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
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28565>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.16ed921b7f8619ad075c558601ef211b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.