Ability to exclude static files
robmoorman opened this issue · 3 comments
robmoorman commented
By default all staticfiles are collected. However hosting a static site doesn't required e.g. the /admin/
directory to be hosted.
Currently I see two options:
- Instruct developers how to disable the admin app with specific settings while executing the build command
- Add an extra setting (.e.g
BUILD_EXCLUDED_FILES
) which should be removed post-collectstatic
palewire commented
The build command now has --skip-static
and --skip-media
keyword arguments you can pass in to the command line. Do those work for you?
robmoorman commented
Thanks @palewire I'll give it a try, so manage.py build --skip-static admin
should exclude the admin directory from the static files then?
palewire commented
right I believe it will only skip static files globally and will not accept an app as an input.