From be9f31e51989e3a0610945cda445cf973aa1f6ed Mon Sep 17 00:00:00 2001 From: Jonathan Math Date: Fri, 3 Jul 2020 03:00:41 -0400 Subject: [PATCH] fix issue with static files in local development by making STATIC_URL = '/static/' and STATIC_ROOT = '/static/static_root/' if DEBUG == True in settings.py --- apps/reader/Things to talk about with Sam | 5 +++++ newsblur/settings.py | 11 +++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 apps/reader/Things to talk about with Sam diff --git a/apps/reader/Things to talk about with Sam b/apps/reader/Things to talk about with Sam new file mode 100644 index 000000000..a57eaabd7 --- /dev/null +++ b/apps/reader/Things to talk about with Sam @@ -0,0 +1,5 @@ +Things to talk about with Sam + +apps.reader.forms.save errors out because authenticate() rejects inactive users now unless you use a different Auth backend +why is psycopg2 commented out of requirements? +newsblur.com css issues on home page \ No newline at end of file diff --git a/newsblur/settings.py b/newsblur/settings.py index 5d6a4354d..5ccc8b426 100644 --- a/newsblur/settings.py +++ b/newsblur/settings.py @@ -71,8 +71,15 @@ USE_I18N = False LOGIN_REDIRECT_URL = '/' LOGIN_URL = '/account/login' MEDIA_URL = '/media/' -STATIC_URL = '/media/' -STATIC_ROOT = '/media/' + +if DEBUG: + STATIC_URL = '/static/' + STATIC_ROOT = '/static/static_root/' +else: + STATIC_URL = '/media/' + STATIC_ROOT = '/media/' + + # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a # trailing slash. # Examples: "http://foo.com/media/", "/media/".