Skip to content

Commit

Permalink
contrihub: settings: Set static url based on base url
Browse files Browse the repository at this point in the history
Signed-off-by: Shashank Verma <[email protected]>
  • Loading branch information
shank03 committed Oct 4, 2023
1 parent 63f9c19 commit ec63e06
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion contrihub/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,12 @@
os.path.join(BASE_DIR, 'assets'),
)

STATIC_URL = '/static/'
BASE_URL = config('BASE_URL', default=None)
if BASE_URL:
STATIC_URL = '/' + str(BASE_URL) + 'static/'
else:
STATIC_URL = '/static/'

STATIC_ROOT = 'static'
STATICFILES_STORAGE = 'whitenoise.storage.CompressedStaticFilesStorage'

Expand Down

0 comments on commit ec63e06

Please sign in to comment.