From 7872bd31af921978b2c22b56c79dabd1f649476c Mon Sep 17 00:00:00 2001 From: HipsterCat Date: Wed, 19 Dec 2018 13:18:15 +0100 Subject: [PATCH] Encoded URLs, should fix #1 --- hrss/settings.py | 3 ++- web/templates/setup.html | 2 +- web/urls.py | 4 ++-- web/views.py | 17 ++++++++++++----- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/hrss/settings.py b/hrss/settings.py index 91014d5..63dd847 100644 --- a/hrss/settings.py +++ b/hrss/settings.py @@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/2.0/ref/settings/ """ import os +import urllib.parse # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @@ -122,7 +123,7 @@ USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/2.0/howto/static-files/ -STATIC_URL = '/static/' +STATIC_URL = '/'+urllib.parse.urlparse(BASE_URL).path[1:]+'/static/' STATIC_ROOT = os.path.join(BASE_DIR, 'static') USE_X_FORWARDED_HOST = True diff --git a/web/templates/setup.html b/web/templates/setup.html index 12e276c..511cd06 100644 --- a/web/templates/setup.html +++ b/web/templates/setup.html @@ -44,7 +44,7 @@ - +