-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix local static files when using uvicorn
- Loading branch information
1 parent
cd6e699
commit b1bbc1d
Showing
5 changed files
with
15 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
from decouple import config | ||
""" | ||
Static files (CSS, JavaScript, Images) | ||
https://docs.djangoproject.com/en/4.2/howto/static-files/ | ||
""" | ||
|
||
from decouple import config | ||
|
||
# Static files (CSS, JavaScript, Images) | ||
# https://docs.djangoproject.com/en/4.2/howto/static-files/ | ||
|
||
# Where to collect static files in production/development deployments | ||
STATIC_ROOT = config("STATIC_ROOT", default="/var/api_static_content/static") | ||
# Static files only served by Django in local environments | ||
# In live environments, the files are served by Nginx, copied out of the Django image | ||
STATIC_ROOT = config("STATIC_ROOT", default="/static") | ||
|
||
STATIC_URL = "static/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters