def getFromTemplate(boxattr, template_list, template, attr, default):
	"""
	Get an attribute from the template or object
	"""
	
	res = boxattr.get(attr, template_list.get(template, {}).get(attr, default))
	
	return res