Esempio n. 1
0
def buildBadgesForGame(sender,**kwargs):
	try:
		game = kwargs['instance']
		players = game.players()
		for badge in (b for p in players if p.user for b in  p.user.badge_set.all()):
			build_badge(badge)
	except Exception as e:
		logging.exception(e.args[0])
Esempio n. 2
0
def buildBadges(sender,**kwargs):
	print "handler was called"
	user= kwargs['user']
	for b in user.badge_set.all():
		build_badge(b)