Skip to content

Commit

Permalink
fix warning about STATICFILES_DIR not exists when run manage.py comma…
Browse files Browse the repository at this point in the history
…nds (#6348)
  • Loading branch information
imwhatiam authored Jul 15, 2024
1 parent d3ab3c5 commit 9243e13
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions seahub/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,15 @@
STATIC_URL = '/media/assets/'

# Additional locations of static files
STATICFILES_DIRS = (
STATICFILES_DIRS = [
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
'%s/static' % PROJECT_ROOT,
'%s/frontend/build' % PROJECT_ROOT,
)
]
# %s/frontend/build perhaps not exists
if os.path.isdir('%s/frontend/build' % PROJECT_ROOT):
STATICFILES_DIRS.append('%s/frontend/build' % PROJECT_ROOT)

WEBPACK_LOADER = {
'DEFAULT': {
Expand Down

0 comments on commit 9243e13

Please sign in to comment.