8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-05 01:16:27 +00:00

Build and load bundle in Django

This commit is contained in:
Alexandre Iooss 2020-04-22 11:33:13 +02:00
parent 0dc3329f7a
commit 8f7ecef843
No known key found for this signature in database
GPG key ID: 6C79278F3FCDCC02
3 changed files with 7 additions and 0 deletions

View file

@ -20,3 +20,4 @@ graphviz
git git
gettext gettext
python3-django-ldapdb python3-django-ldapdb
yarnpkg

View file

@ -361,6 +361,11 @@ update_django() {
python3 manage.py migrate python3 manage.py migrate
echo "Applying Django migrations: Done" echo "Applying Django migrations: Done"
echo "Packing JavaScript together..."
yarnpkg install
yarnpkg build
echo "Packing JavaScript together: Done"
echo "Collecting web frontend statics ..." echo "Collecting web frontend statics ..."
python3 manage.py collectstatic --noinput python3 manage.py collectstatic --noinput
echo "Collecting web frontend statics: Done" echo "Collecting web frontend statics: Done"

View file

@ -43,6 +43,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<meta property="og:description" content="Networking managing website endorsed by FedeRez." /> <meta property="og:description" content="Networking managing website endorsed by FedeRez." />
{# Preload JavaScript #} {# Preload JavaScript #}
<script src="{% static 'bundles/re2o.min.js' %}"></script>
{% bootstrap_javascript %} {% bootstrap_javascript %}
<script src="/static/js/typeahead/typeahead.js"></script> <script src="/static/js/typeahead/typeahead.js"></script>
<script src="/static/js/bootstrap-tokenfield/bootstrap-tokenfield.js"></script> <script src="/static/js/bootstrap-tokenfield/bootstrap-tokenfield.js"></script>