Skip to content

Commit

Permalink
feat: specify the static url prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
xyb committed Nov 3, 2023
1 parent 4dbef2e commit 13cb953
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,6 @@ DB_USER = 'postgres'
DB_PASSWORD = ''
DB_HOST = ''
DB_PORT = ''
# prefix of url to access static files
DJANGO_STATIC_URL = 'static/'
```
2 changes: 1 addition & 1 deletion baidupcsleecher/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 13cb953

Please sign in to comment.