def transfers(request): logging.info("djrs.view.transfers") harness = getWebHarness() if harness.is_connected() is False: return HttpResponseRedirect(reverse('djrs_login')) template_vars = {} try: (req_id, msg_id) = harness.request_transfer_list(True) # upload resp = harness.specific_response(req_id) if resp: (resp_id, resp_msg) = resp dict_msg = protobuf_to_dict(resp_msg) template_vars['upload_list'] = files_transferlist(dict_msg['transfers']) except Exception, e: logging.info("Unexpected Exception: %s" % (e))
def transfers(request): logging.info("djrs.view.transfers") harness = getWebHarness() if harness.is_connected() is False: return HttpResponseRedirect(reverse('djrs_login')) template_vars = {} try: (req_id, msg_id) = harness.request_transfer_list(True) # upload resp = harness.specific_response(req_id) if resp: (resp_id, resp_msg) = resp dict_msg = protobuf_to_dict(resp_msg) template_vars['upload_list'] = files_transferlist( dict_msg['transfers']) except Exception, e: logging.info("Unexpected Exception: %s" % (e))
if 'transfers' in dict_msg: template_vars['upload_list'] = \ files_transferlist(dict_msg['transfers']) except Exception, e: logging.info("Unexpected Exception: %s" % (e)) try: (req_id, msg_id) = harness.request_transfer_list(False) # download resp = harness.specific_response(req_id) if resp: (resp_id, resp_msg) = resp dict_msg = protobuf_to_dict(resp_msg) if 'transfers' in dict_msg: template_vars['download_list'] = \ files_transferlist(dict_msg['transfers']) except Exception, e: logging.info("Unexpected Exception: %s" % (e)) return render_to_response('djrs_transfers.dtml', template_vars, context_instance=RequestContext(request)) def transfer_download(request, hash): logging.info("djrs.view.transfer_download") template_vars = {} # parse the extra arguments for the full download details. size = request.GET.get('size', None) name = request.GET.get('name', None)
if resp: (resp_id, resp_msg) = resp dict_msg = protobuf_to_dict(resp_msg) template_vars['upload_list'] = files_transferlist( dict_msg['transfers']) except Exception, e: logging.info("Unexpected Exception: %s" % (e)) try: (req_id, msg_id) = harness.request_transfer_list(False) # download resp = harness.specific_response(req_id) if resp: (resp_id, resp_msg) = resp dict_msg = protobuf_to_dict(resp_msg) template_vars['download_list'] = files_transferlist( dict_msg['transfers']) except Exception, e: logging.info("Unexpected Exception: %s" % (e)) return render_to_response('djrs_transfers.dtml', template_vars, context_instance=RequestContext(request)) def transfer_download(request, hash): logging.info("djrs.view.transfer_download") template_vars = {} # parse the extra arguments for the full download details. size = request.GET.get('size', None)
resp = harness.specific_response(req_id) if resp: (resp_id, resp_msg) = resp dict_msg = protobuf_to_dict(resp_msg) template_vars['upload_list'] = files_transferlist(dict_msg['transfers']) except Exception, e: logging.info("Unexpected Exception: %s" % (e)) try: (req_id, msg_id) = harness.request_transfer_list(False) # download resp = harness.specific_response(req_id) if resp: (resp_id, resp_msg) = resp dict_msg = protobuf_to_dict(resp_msg) template_vars['download_list'] = files_transferlist(dict_msg['transfers']) except Exception, e: logging.info("Unexpected Exception: %s" % (e)) return render_to_response('djrs_transfers.dtml', template_vars, context_instance=RequestContext(request)) def transfer_download(request, hash): logging.info("djrs.view.transfer_download") template_vars = {} # parse the extra arguments for the full download details. size = request.GET.get('size', None) name = request.GET.get('name', None)