Mercurial > public > sg101
diff forums/management/commands/topic_export.py @ 991:4aadaf3bc234
Added SITE_SCHEME setting.
Configure site scheme to be either http or https based on SITE_SCHEME setting.
Updated code to use it.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 01 Nov 2015 15:56:05 -0600 |
parents | 91de9b15b410 |
children |
line wrap: on
line diff
--- a/forums/management/commands/topic_export.py Sat Oct 31 17:36:31 2015 -0500 +++ b/forums/management/commands/topic_export.py Sun Nov 01 15:56:05 2015 -0600 @@ -9,6 +9,7 @@ from optparse import make_option import re +from django.conf import settings from django.core.management.base import LabelCommand, CommandError from django.template.loader import render_to_string, TemplateDoesNotExist @@ -16,7 +17,7 @@ SRC_RE = re.compile(r'src="/media/') -SRC_REPL = 'src="http://surfguitar101.com/media/' +SRC_REPL = 'src="{}://surfguitar101.com/media/'.format(settings.SITE_SCHEME) class Command(LabelCommand):