def get_installation_history(user):
	apps = ApeicDBHelper.select('%s_installed_apps' % user, 
		select_items=('application', 'start_date'))

	history = defaultdict(list)
	map(lambda x: history[x[1].date()].append(x[0]), apps)
	history = sorted(history.iteritems(), key=operator.itemgetter(0))
	return history
Exemplo n.º 2
0
def get_uninstallation_history(user):
	apps = DB.select('%s_installed_apps' % user, 
		select_items=('application', 'end_date'), 
		where_items={'end_date IS NOT': None})
	
	history = defaultdict(list)
	map(lambda x: history[x[1].date()].append(x[0]), apps)
	history = sorted(history.iteritems(), key=operator.itemgetter(0))
	return history