Example #1
0
def download_backup(request, filename):
    print "Trying to download {}".format(filename)
    wrapper, size = backup.get_wrapped_file(filename)
    response = HttpResponse(wrapper, content_type='text/plain')
    response['Content-Length'] = size
    response['Content-Disposition'] = "attachment; filename=%s" % filename
    return response
Example #2
0
def download_backup(request, filename):
    print "Trying to download {}".format(filename)
    wrapper, size = backup.get_wrapped_file(filename)
    response = HttpResponse(wrapper, content_type='text/plain')
    response['Content-Length'] = size
    response['Content-Disposition'] = "attachment; filename=%s" % filename
    return response