Exemple #1
0
def send_notification(message, suggestion, exclude_user):
	def f(i): 
		return i.nickname != "" and i.user != exclude_user and i.email != 'none'
	targets = filter(f, get_all_crew(suggestion.group))
	#targets = UserInfo.gql('WHERE nickname = :1', 'paul')
	targets = [ str(target.key()) for target in targets ]
	targets = ",".join(targets)
	
	params = { 'suggestion': suggestion.key(), 
			   'message': message, 
			   'targets': targets,
			   'reply_to': 'false' }
	
	taskqueue.add(url='/task/email', params=params)
Exemple #2
0
	def render_admin(self):
		group = self.currentgroup
		context = { 'crew': get_all_crew(group) }
		self.render('admin', context)