From 8f7ecef8431a12fd051000af940f26ef8c42405c Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Wed, 22 Apr 2020 11:33:13 +0200 Subject: [PATCH] Build and load bundle in Django --- apt_requirements.txt | 1 + install_re2o.sh | 5 +++++ templates/base.html | 1 + 3 files changed, 7 insertions(+) diff --git a/apt_requirements.txt b/apt_requirements.txt index 1087e1fe..b2d74b27 100644 --- a/apt_requirements.txt +++ b/apt_requirements.txt @@ -20,3 +20,4 @@ graphviz git gettext python3-django-ldapdb +yarnpkg \ No newline at end of file diff --git a/install_re2o.sh b/install_re2o.sh index dcc8d971..175fffd3 100755 --- a/install_re2o.sh +++ b/install_re2o.sh @@ -361,6 +361,11 @@ update_django() { python3 manage.py migrate echo "Applying Django migrations: Done" + echo "Packing JavaScript together..." + yarnpkg install + yarnpkg build + echo "Packing JavaScript together: Done" + echo "Collecting web frontend statics ..." python3 manage.py collectstatic --noinput echo "Collecting web frontend statics: Done" diff --git a/templates/base.html b/templates/base.html index 95bd3f37..8ec82126 100644 --- a/templates/base.html +++ b/templates/base.html @@ -43,6 +43,7 @@ with this program; if not, write to the Free Software Foundation, Inc., {# Preload JavaScript #} + {% bootstrap_javascript %}