From 40c9b83c496a20b218e5928b0abebe2284056a06 Mon Sep 17 00:00:00 2001 From: Ross Date: Wed, 20 Jan 2021 23:57:12 +0000 Subject: [PATCH] . --- rad/settings.py | 4 ++-- rapids/models.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rad/settings.py b/rad/settings.py index 80a628ee..9ac315a7 100644 --- a/rad/settings.py +++ b/rad/settings.py @@ -155,8 +155,8 @@ REMOTE_URL = "http://penracourses.org.uk/" MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media/') -if DEBUG: - MEDIA_URL = REMOTE_URL + MEDIA_URL +#if DEBUG: +# MEDIA_URL = REMOTE_URL + MEDIA_URL # Redirect to home URL after login (Default redirects to /accounts/profile/) LOGIN_REDIRECT_URL = "/" diff --git a/rapids/models.py b/rapids/models.py index 91482092..f73c1eed 100644 --- a/rapids/models.py +++ b/rapids/models.py @@ -275,8 +275,8 @@ class RapidImage(models.Model): def image_tag(self): if self.image: return mark_safe( - 'Click and hold to zoom' - .format(settings.MEDIA_URL, self.image)) + 'Click and hold to zoom' + .format(self.image.url)) else: return ""