def queryset_to_dict(qs, key='pk'):
	"""
	Given a queryset will transform it into a dictionary based on ``key``.
	param:
		key: string  default is 'pk'
	"""
	return dict((getattr(u, key), u) for u in qs)