Skip to content

Commit

Permalink
Merge pull request #99 from krishnakuruvadi/issue_98
Browse files Browse the repository at this point in the history
Re-adding Whitenoise package and configuration for static files
  • Loading branch information
lal309 authored Sep 27, 2023
2 parents 0f0fcf7 + 9da6957 commit a0fec73
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ txaio==20.12.1
typing_extensions==4.4.0
urllib3==1.26.12
wcwidth==0.2.5
whitenoise==6.5.0
wheel==0.40.0
wrapt==1.12.1
wsproto==1.2.0
Expand Down
2 changes: 1 addition & 1 deletion src/metadata.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"release_version": "0.2.5"
"release_version": "0.2.6"
}
3 changes: 3 additions & 0 deletions src/portfoliomgr/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@

MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
Expand Down Expand Up @@ -191,6 +192,8 @@
os.path.join(BASE_DIR, "static"),
]

STATICFILES_STORAGE = 'whitenoise.storage.CompressedStaticFilesStorage'

STATIC_URL = '/static/'

STATIC_ROOT = os.path.join(BASE_DIR, 'collected_files')
Expand Down

0 comments on commit a0fec73

Please sign in to comment.