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
def get(self): try : send_msg, manual_notify_msg = email_nag.nagEmailScript() return flask.render_template('show_message.html', send_msg = send_msg, manual_notify = manual_notify_msg) except Exception,e: print '\nlogin error:\n', e
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 app.add_url_rule('/',view_func=Main.as_view('index'), methods=['GET']) ======= try : send_msg, manual_notify_msg = email_nag.nagEmailScript() #print "MESSAGES:\n" #for msg in send_msg: #print msg, "\n" return flask.render_template('show_message.html', send_msg = send_msg, manual_notify = manual_notify_msg) except Exception,e: #return flask.redirect(flask.url_for('show_message')) print '\nlogin error:\n', e print '\n' @login_required def post(self): msg_id_list = flask.request.form.getlist('messageid') for msgid in msg_id_list: #print msgid,"\n\n"