def get_downloads(self, obj):
    downloads = obj.get_downloads()
    data = {}
    for (k, v) in downloads.items():
        if (k in ('html', 'pdf', 'epub')):
            if (k == 'html'):
                k = 'htmlzip'
            data[k] = (('http:' if settings.DEBUG else 'https:') + v)
    return data
def get_downloads(self, obj):
    downloads = obj.get_downloads()
    data = {}
    for (k, v) in downloads.items():
        if (k in ('html', 'pdf', 'epub')):
            if (k == 'html'):
                k = 'htmlzip'
            data[k] = (('http:' if settings.DEBUG else 'https:') + v)
    return data