diff --git a/castellum_core/Makefile b/castellum_core/Makefile index b97b22676c232226a52a330c07da47eabb0a6dc4..42a7ca3d4f144d8e33b739f71f76c984c4390330 100644 --- a/castellum_core/Makefile +++ b/castellum_core/Makefile @@ -21,5 +21,3 @@ install: pip install tox ipdb pip install -e . npm install - mkdir -p castellum_core/static/ - cp node_modules/bootstrap/dist/css/bootstrap.min.css castellum_core/static/ diff --git a/castellum_core/castellum_core/castellum_core/settings/default.py b/castellum_core/castellum_core/castellum_core/settings/default.py index 130e5ec3b36517ffec2c81c89a4fec5dda950d8f..9956d44998761301e19e5e74e69a014a5c733dba 100644 --- a/castellum_core/castellum_core/castellum_core/settings/default.py +++ b/castellum_core/castellum_core/castellum_core/settings/default.py @@ -95,4 +95,17 @@ STATICFILES_DIRS = [ os.path.join(BASE_DIR, 'static'), ] + +STATICFILES_FINDERS = [ + 'django.contrib.staticfiles.finders.FileSystemFinder', + 'django.contrib.staticfiles.finders.AppDirectoriesFinder', + 'npm.finders.NpmFinder', +] + STATIC_URL = '/static/' + +NPM_ROOT_PATH = os.path.dirname(BASE_DIR) + +NPM_FILE_PATTERNS = { + 'bootstrap': ['dist/css/bootstrap.min.css'], +} diff --git a/castellum_core/castellum_core/templates/base.html b/castellum_core/castellum_core/templates/base.html index e36d4a23d0c4d074f5479e7d29173f09d5c55562..32d53c25910a1217a3c65153db41b5094e0462d3 100644 --- a/castellum_core/castellum_core/templates/base.html +++ b/castellum_core/castellum_core/templates/base.html @@ -5,7 +5,7 @@ {% block title %}Castellum{% endblock %} - + diff --git a/castellum_core/setup.py b/castellum_core/setup.py index b8cdd664779d9860dba3e43874516d83fb059030..3e42514ca7d6d597613c42c4a5b1a2a129994cdb 100644 --- a/castellum_core/setup.py +++ b/castellum_core/setup.py @@ -12,5 +12,6 @@ setup( install_requires=[ "Django==2.0.4", "django-bootstrap4==0.0.6", + "django-npm==1.0.0" ], )