diff --git a/README.md b/README.md index 64f5898..2d744f1 100644 --- a/README.md +++ b/README.md @@ -218,4 +218,6 @@ DB_USER = 'postgres' DB_PASSWORD = '' DB_HOST = '' DB_PORT = '' +# prefix of url to access static files +DJANGO_STATIC_URL = 'static/' ``` diff --git a/baidupcsleecher/settings.py b/baidupcsleecher/settings.py index f121bf2..b4eca1f 100644 --- a/baidupcsleecher/settings.py +++ b/baidupcsleecher/settings.py @@ -188,7 +188,7 @@ # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/4.1/howto/static-files/ -STATIC_URL = "static/" +STATIC_URL = getenv("DJANGO_STATIC_URL", "static/") STATIC_ROOT = BASE_DIR / "staticfiles" STATICFILES_DIRS = [ BASE_DIR / "static",