Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Customizable theming fix background images issue #2006

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
setup static-override folders for custom deployment
As discussed on #1996,
we are making the theme customizable for deployment
by .env configuration. This lead us modifying existing css files
adding configurable image files.
This folder should be used to store deployment specific
static files.

It is expected that compilestatic will be ran first(which will
generate the css, image files and store them to the static-override folder),
and then collectstatic will be ran which will collect static files
from static and static-override directories

Note that, the `static-overrides` comes before the `static` on base.py
This is intentional to make sure `static-overrides` is given
first priority if there are same file in these two directories.
  • Loading branch information
superryeti committed May 16, 2023
commit e036ff4f0b33e8451c73fc449b086a6588e8de56
5 changes: 4 additions & 1 deletion physionet-django/physionet/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@
# https://docs.djangoproject.com/en/1.11/howto/static-files/

STATIC_URL = '/static/'
STATICFILES_DIRS = [os.path.join(BASE_DIR,'static')]
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static-overrides'),
os.path.join(BASE_DIR, 'static'),
]
# Google Storge service account credentials
if config('GOOGLE_APPLICATION_CREDENTIALS', default=None):
GOOGLE_APPLICATION_CREDENTIALS = os.path.join(
Expand Down
1 change: 1 addition & 0 deletions physionet-django/static-overrides/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
static-overrides/*
Empty file.