Skip to content

Working with static files (Beast Whoosh front end)

Frederic Font edited this page Apr 30, 2019 · 7 revisions

To work with static files (Beast Whoosh front end only) you need to use node to build the css/js/... files. Also BW frontend uses Django's collectstatic so you need to run that as well in order to copy the generated static files to the correct directory. So far there is no way to automatize this process and it needs to happen manually running the following commands (from the repository root):

# install npm modules (if needed)
npm install

# build static files
npm run build

# place files in correct colation
python manage.py collectstatic --noinput

To simplify, you can run the following command which includes last two steps:

npm run build && python manage.py collectstatic --noinput

NOTE: BW frontend uses a static files storage which will automatically add hashes to static files filenames and change paths accordingly in templates.

NOTE2: To load Freesound with BW forntend activated, you need to set a request parameter as follows: http..../?fend=bw. To go back to the previous frontend, use http..../?fend=ng.

Clone this wiki locally