palewire/django-bakery

Ability to exclude static files

robmoorman opened this issue · 3 comments

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:

  1. Instruct developers how to disable the admin app with specific settings while executing the build command
  2. Add an extra setting (.e.g BUILD_EXCLUDED_FILES) which should be removed post-collectstatic

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?

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?

right I believe it will only skip static files globally and will not accept an app as an input.