Mercurial > public > sg101
diff downloads/management/commands/dlwgetcat.py @ 1039:bd59a599b9a3
Update dlwgetcat to use site scheme.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 31 Dec 2015 12:35:31 -0600 |
parents | b59c154d0163 |
children |
line wrap: on
line diff
--- a/downloads/management/commands/dlwgetcat.py Thu Dec 31 12:28:30 2015 -0600 +++ b/downloads/management/commands/dlwgetcat.py Thu Dec 31 12:35:31 2015 -0600 @@ -42,10 +42,13 @@ ext = os.path.splitext(dl.file.name)[1] dl.dest_filename = slugify(dl.title) + ext + base_url = "{}://{}{}".format(settings.SITE_SCHEME, + Site.objects.get_current().domain, + settings.MEDIA_URL) + output = render_to_string('downloads/commands/wget_cat.html', { 'downloads': downloads, - 'domain': Site.objects.get_current().domain, - 'MEDIA_URL': settings.MEDIA_URL, + 'base_url': base_url, }) self.stdout.write(output)