This commit is contained in:
Ross
2021-01-20 23:57:12 +00:00
parent c6f8d9f261
commit 40c9b83c49
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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 = "/"
+2 -2
View File
@@ -275,8 +275,8 @@ class RapidImage(models.Model):
def image_tag(self):
if self.image:
return mark_safe(
'<img src="{}media{}" class="admin-rapid-image" /><span class="admin-rapid-image-info">Click and hold to zoom<span>'
.format(settings.MEDIA_URL, self.image))
'<img src="{}" class="admin-rapid-image" /><span class="admin-rapid-image-info">Click and hold to zoom<span>'
.format(self.image.url))
else:
return ""