From 78ebc872655aa7076613e053d97a3defd4d61966 Mon Sep 17 00:00:00 2001 From: Christopher Charbonneau Wells Date: Thu, 24 Aug 2017 07:54:47 -0400 Subject: [PATCH] Use static_src directories to prevent collisions with Django's collectstatic. --- babyblotter/settings/base.py | 4 ---- .../js/babyblotter.js | 0 .../scss/_functions.scss | 0 .../scss/_global.scss | 0 .../scss/_mixins.scss | 0 .../scss/_variables.scss | 0 .../scss/babyblotter.scss | 0 core/{static => static_src}/js/timer.js | 0 core/{static => static_src}/scss/timers.scss | 0 dashboard/{static => static_src}/scss/cards.scss | 0 gulpfile.js/config.js | 16 +++++++--------- 11 files changed, 7 insertions(+), 13 deletions(-) rename babyblotter/{static_site => static_src}/js/babyblotter.js (100%) rename babyblotter/{static_site => static_src}/scss/_functions.scss (100%) rename babyblotter/{static_site => static_src}/scss/_global.scss (100%) rename babyblotter/{static_site => static_src}/scss/_mixins.scss (100%) rename babyblotter/{static_site => static_src}/scss/_variables.scss (100%) rename babyblotter/{static_site => static_src}/scss/babyblotter.scss (100%) rename core/{static => static_src}/js/timer.js (100%) rename core/{static => static_src}/scss/timers.scss (100%) rename dashboard/{static => static_src}/scss/cards.scss (100%) diff --git a/babyblotter/settings/base.py b/babyblotter/settings/base.py index 545e2652..65bbba31 100644 --- a/babyblotter/settings/base.py +++ b/babyblotter/settings/base.py @@ -108,10 +108,6 @@ STATIC_URL = '/static/' STATIC_ROOT = os.path.join(BASE_DIR, 'static') -STATICFILES_DIRS = [ - os.path.join(BASE_DIR, 'babyblotter', 'static'), -] - # Django Rest Framework # http://www.django-rest-framework.org/# diff --git a/babyblotter/static_site/js/babyblotter.js b/babyblotter/static_src/js/babyblotter.js similarity index 100% rename from babyblotter/static_site/js/babyblotter.js rename to babyblotter/static_src/js/babyblotter.js diff --git a/babyblotter/static_site/scss/_functions.scss b/babyblotter/static_src/scss/_functions.scss similarity index 100% rename from babyblotter/static_site/scss/_functions.scss rename to babyblotter/static_src/scss/_functions.scss diff --git a/babyblotter/static_site/scss/_global.scss b/babyblotter/static_src/scss/_global.scss similarity index 100% rename from babyblotter/static_site/scss/_global.scss rename to babyblotter/static_src/scss/_global.scss diff --git a/babyblotter/static_site/scss/_mixins.scss b/babyblotter/static_src/scss/_mixins.scss similarity index 100% rename from babyblotter/static_site/scss/_mixins.scss rename to babyblotter/static_src/scss/_mixins.scss diff --git a/babyblotter/static_site/scss/_variables.scss b/babyblotter/static_src/scss/_variables.scss similarity index 100% rename from babyblotter/static_site/scss/_variables.scss rename to babyblotter/static_src/scss/_variables.scss diff --git a/babyblotter/static_site/scss/babyblotter.scss b/babyblotter/static_src/scss/babyblotter.scss similarity index 100% rename from babyblotter/static_site/scss/babyblotter.scss rename to babyblotter/static_src/scss/babyblotter.scss diff --git a/core/static/js/timer.js b/core/static_src/js/timer.js similarity index 100% rename from core/static/js/timer.js rename to core/static_src/js/timer.js diff --git a/core/static/scss/timers.scss b/core/static_src/scss/timers.scss similarity index 100% rename from core/static/scss/timers.scss rename to core/static_src/scss/timers.scss diff --git a/dashboard/static/scss/cards.scss b/dashboard/static_src/scss/cards.scss similarity index 100% rename from dashboard/static/scss/cards.scss rename to dashboard/static_src/scss/cards.scss diff --git a/gulpfile.js/config.js b/gulpfile.js/config.js index bcad9056..021787b9 100644 --- a/gulpfile.js/config.js +++ b/gulpfile.js/config.js @@ -26,10 +26,10 @@ module.exports = { 'node_modules/tempusdominus-bootstrap-4/build/js/tempusdominus-bootstrap-4.js' ], app: [ - 'babyblotter/static_site/js/babyblotter.js', - 'api/static/js/*.js', - 'core/static/js/*.js', - 'dashboard/static/js/*.js' + 'babyblotter/static_src/js/babyblotter.js', + 'api/static_src/js/*.js', + 'core/static_src/js/*.js', + 'dashboard/static_src/js/*.js' ] }, stylesConfig: { @@ -38,17 +38,15 @@ module.exports = { 'node_modules/tempusdominus-bootstrap-4/build/css/tempusdominus-bootstrap-4.css', 'node_modules/font-awesome/css/font-awesome.css' ], - app: 'babyblotter/static_site/scss/babyblotter.scss' + app: 'babyblotter/static_src/scss/babyblotter.scss' }, watchConfig: { scriptsGlob: [ - '**/static/js/**/*.js', - 'babyblotter/static_site/js/**/*.js', + '**/static_src/js/**/*.js', '!babyblotter/static/js/' ], stylesGlob: [ - '**/static/scss/**/*.scss', - 'babyblotter/static_site/scss/**/*.scss' + '**/static_src/scss/**/*.scss' ] } };