Skip to content

Commit

Permalink
Use FORCE_SCRIPT_NAME (#31)
Browse files Browse the repository at this point in the history
* Working on a landing page.

* Update STATIC_URL to get it from env

* Try using STATIC_HOST as well.

* STATIC_HOST + STATIC_URL

* Use FORCE_SCRIPT_NAME
  • Loading branch information
Kraust authored May 10, 2024
1 parent f2320df commit 77c6ebf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions OSCR_django/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.2/howto/static-files/
STATIC_HOST = os.environ.get("STATIC_HOST", "")
STATIC_URL = STATIC_HOST + os.environ.get("STATIC_URL", "static/")
FORCE_SCRIPT_NAME = os.environ.get("FORCE_SCRIPT_NAME", "")
STATIC_URL = FORCE_SCRIPT_NAME + os.environ.get("STATIC_URL", "/static/")

# Default primary key field type
# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field
Expand Down

0 comments on commit 77c6ebf

Please sign in to comment.