def result_summary_info(request,object_id):
	object = get_object_or_404(Results.ResultSummaryList, pk=object_id)
	
	protocolfields={}
	for (fieldname, text, cond) in [("version_intolerant", "Version Intolerant", Results.ResultCondition.RESULTC_VERSION_INTOLERANT), 
											("extension_intolerant","Extension Intolerant", Results.ResultCondition.RESULTC_EXTENSION_INTOLERANT),
											("extension_and_version_intolerant","Extension and Version Intolerant", Results.ResultCondition.RESULTC_VERANDEXT_INTOLERANT), 
											("extension_or_version_intolerant","Extension or Version Intolerant", Results.ResultCondition.RESULTC_VEROREXT_INTOLERANT),
											("bad_version","Require Bad Version", Results.ResultCondition.RESULTC_BADVERSION),
											("bad_check","No Version check", Results.ResultCondition.RESULTC_NOVERSION),
											]:
		cond_item = object.conditions.get(condition = cond)
		for (ver) in [(3,0),(3,1),(3,2),(3,3),(3,4),(3,11),(4,1),(0,3),(0,4)]:
			if ver == (3,0):
				title = "SSL v3"
			elif ver[0] == 0:
				title = "Summary TLS %d.x" %(ver[1]-2,)
			else:
				title = "TLS %d.%d" %(ver[0]-2, (ver[1]-1 if ver[0]==3 else ver[1]))
			Q = cond_item.resultentryprotocol_set.filter(version_tested_major=ver[0],version_tested_minor=ver[1])
			protocolfields.setdefault(str(ver),{"title":title, "values":{}})["values"][fieldname]={"header":text, "count":Q.count()}
		
	summary_fields = []	
	for (fieldname, text, cond) in [("renego", "Renego Patched", Results.ResultCondition.RESULTC_RENEGO), 
								("renego_noncompliant", "Renego Patched but non-compliant", Results.ResultCondition.RESULTC_RENEGONONCOMPLIANT),
								("renego_unpatched", "Not Renego Patched", Results.ResultCondition.RESULTC_NONRENEGO),
								("renego_unstable", "Renego Patched, but unstable", Results.ResultCondition.RESULTC_RENEGOUNSTABLE),
								]:
		cond_item = object.conditions.get(condition = cond)
		Q = cond_item.resultentry_set.all()
		summary_fields.append({"header":text, "count":Q.count()})
	
	
	return render_to_response("summary.html", {
						"object":object,
						"protocolfields":protocolfields,
						"summary_fields":summary_fields,
						"debug_output":[x for x in connection.queries],
						})
Present a result summary
dataset/ETHPy150Open operasoftware/tlsprober/probedb/resultdb2/views.py/result_summary_info