From 83904983c505b74920560e1d2e31ea60b30089a3 Mon Sep 17 00:00:00 2001 From: EsGeh Date: Fri, 29 Nov 2019 16:32:16 +0100 Subject: [PATCH] added custom static file dir --- README.md | 6 ++++++ res/static | 1 - res/static/webdesign_platform | 1 + scripts/init.py | 4 ++++ src/eoa/settings.py | 3 ++- 5 files changed, 13 insertions(+), 2 deletions(-) delete mode 120000 res/static create mode 120000 res/static/webdesign_platform diff --git a/README.md b/README.md index 9501ebf..2ea3b97 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,12 @@ That's all. 1. edit `res/custom_config/*` 2. $ ./scripts/init.py --skip-db +- You might want to add your organisations logo, favicon etc: + + Copy them into `res/static/custom_static/`. Files in this directory overwrite default files with the same name. + + TODO: list images that one typically wants to overwrite + #### REMARK The templates expect some pages to exist in the CMS: diff --git a/res/static b/res/static deleted file mode 120000 index 982b54e..0000000 --- a/res/static +++ /dev/null @@ -1 +0,0 @@ -../dependencies/webdesign_platform/dist \ No newline at end of file diff --git a/res/static/webdesign_platform b/res/static/webdesign_platform new file mode 120000 index 0000000..17f5524 --- /dev/null +++ b/res/static/webdesign_platform @@ -0,0 +1 @@ +../../dependencies/webdesign_platform/dist \ No newline at end of file diff --git a/scripts/init.py b/scripts/init.py index 4d665cb..8b30523 100755 --- a/scripts/init.py +++ b/scripts/init.py @@ -35,6 +35,10 @@ def copy_dir(src, dst): def create_dirs( config ): + create_dir( + BASE_DIR / config['RES_DIR'] / "static/custom_static" + ) + create_dir( BASE_DIR / config['DATABASE_DATA_DIR'] ) diff --git a/src/eoa/settings.py b/src/eoa/settings.py index 0c8d279..d51eab0 100644 --- a/src/eoa/settings.py +++ b/src/eoa/settings.py @@ -234,7 +234,8 @@ MEDIA_ROOT = RES_DIR / 'all_media_files' STATICFILES_DIRS = [ - RES_DIR / "static", + RES_DIR / "static" / "custom_static", + RES_DIR / "static" / "webdesign_platform", ] SITE_ID = 1