Example #1
0
	def post(self):
		send = False
		if 'Send' in flask.request.form:
			send = True
		msgToSend = request.form['msg_body']
		try :
			last_msg, msg = email_nag.getMessage(msgToSend,send)
			print "******BB*********\n\n\n",msg
			if last_msg:
				return flask.render_template('show_last_message.html',last_msg = msg  )
			else:
				return flask.render_template('show_message.html',msg = msg)
		except Exception :
			print "\nException:"
			print Exception
Example #2
0
	def get(self):
		
		query_id_list = request.args.getlist('idlist')
		#print query_id_list+"list"
		print "***Useget******\n"
		print flask.session['modified_template']
		flask.session['queries'] = get_selected_queries(query_id_list)
		print "\nprinting from session\n"
		print flask.session['queries']
		try :
			email_nag.nagEmailScript()
			last_msg, msg = email_nag.getMessage("",False)
			print "******BB*********\n\n\n",msg
			if last_msg:
				return flask.render_template('show_last_message.html',last_msg = msg  )
			else:
				return flask.redirect(flask.url_for('show_message',show_msg=msg))
		except Exception, e :
			print "\nException:\n"
			print Exception,e