def index(): theEmailForm = emailForm(request.form) if (request.method == 'POST'): if (request.form['type'] == "img"): files = request.files['file'] filename = secure_filename(files.filename) files.save( os.path.join( os.path.join(os.path.dirname(os.path.abspath(__file__)), 'static/img'), 'GT_logo.png')) src = os.path.join( os.path.join(os.path.dirname(os.path.abspath(__file__)), 'static/img'), 'GT_logo.png') dst = os.path.join( os.path.join( os.path.dirname(os.path.dirname( os.path.abspath(__file__))), 'website/static/img'), 'GT_logo.png') shutil.copyfile(src, dst) #the previous line will need to be calibrated on deploy else: msg = Message('expo.gatech.edu Contact Form', recipients=['*****@*****.**']) msg.add_recipient("*****@*****.**") msg.body = "Name: " + theEmailForm.name.data + "\n Email:" + \ theEmailForm.email.data + "\n\n" + theEmailForm.message.data mail.send(msg) return render_template('index.html', pageName="Index", emailForm=emailForm())
def index(): form = Submit() if form.validate_on_submit(): emailForm(form) return render_template('index.html', title = 'RRO: Rapid Real Estate Offer') return render_template('submit.html', title = 'RRO: Rapid Real Estate Offer', form = form)
def index(): form = Submit() if form.validate_on_submit(): emailForm(form) return render_template('index.html', title='RRO: Rapid Real Estate Offer') return render_template('submit.html', title='RRO: Rapid Real Estate Offer', form=form)
def index(): theEmailForm = emailForm(request.form) if(request.method == 'POST'): msg = Message( 'expo.gatech.edu Contact Form', recipients=['*****@*****.**']) msg.add_recipient("*****@*****.**") msg.body = "Name: " + theEmailForm.name.data + "\n Email:" + \ theEmailForm.email.data + "\n\n" + theEmailForm.message.data mail.send(msg) return render_template('index.html', pageName="Index", emailForm=emailForm())
def schedule(): return render_template('schedule.html', schedule=theDatabase.getSchedule(), busSchedule=theDatabase.getBusSchedule(), schEnd=theDatabase.getSchEnd(), pageName="Spring 2014 Expo Schedule", emailForm=emailForm())
def tips(): return render_template('tips.html', vTips=theDatabase.getAllVTips(), sTips=theDatabase.getAllSTips(), jTips=theDatabase.getAllJTips(), pageName="Tips", emailForm=emailForm())
def search(searchString): return render_template('projects.html', entries=theDatabase.search(searchString), pageName="Search Results", searchTitle="Search Results for: " + "\"" + searchString + "\"", emailForm=emailForm())
def tips(): if (request.method == 'POST'): if (request.form['type'] == "J"): theDatabase.addJudTip(request.form['newTip']) elif (request.form['type'] == "V"): theDatabase.addVisTip(request.form['newTip']) elif (request.form['type'] == "S"): theDatabase.addStuTip(request.form['newTip']) elif (request.form['type'] == "VE"): theDatabase.editVTip(request.form['editVTip'], request.form['vKey']) elif (request.form['type'] == "SE"): theDatabase.editSTip(request.form['editSTip'], request.form['sKey']) elif (request.form['type'] == "JE"): theDatabase.editJTip(request.form['editJTip'], request.form['jKey']) elif (request.form['type'] == "JD"): theDatabase.delJTip(request.form['jKey']) elif (request.form['type'] == "SD"): theDatabase.delSTip(request.form['sKey']) elif (request.form['type'] == "VD"): theDatabase.delVTip(request.form['vKey']) return render_template('tips.html', vTips=theDatabase.getAllVTips(), sTips=theDatabase.getAllSTips(), jTips=theDatabase.getAllJTips(), pageName="Tips", emailForm=emailForm())
def index(): theEmailForm = emailForm(request.form) if(request.method == 'POST'): if(request.form['type']=="img"): files=request.files['file'] filename = secure_filename(files.filename) files.save(os.path.join(os.path.join(os.path.dirname(os.path.abspath(__file__)),'static/img'),'GT_logo.png')) src = os.path.join(os.path.join(os.path.dirname(os.path.abspath(__file__)),'static/img'),'GT_logo.png') dst = os.path.join(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))),'website/static/img'),'GT_logo.png') shutil.copyfile(src,dst) #the previous line will need to be calibrated on deploy else: msg = Message( 'expo.gatech.edu Contact Form', recipients=['*****@*****.**']) msg.add_recipient("*****@*****.**") msg.body = "Name: " + theEmailForm.name.data + "\n Email:" + \ theEmailForm.email.data + "\n\n" + theEmailForm.message.data mail.send(msg) return render_template('index.html', pageName="Index", emailForm=emailForm())
def map(): if (request.method == 'GET'): if request.args.get('rainMap'): return theDatabse.getMapCanvas("rainMap") elif request.args.get("normalMap"): return theDatabase.getMapCanvas("normalMap") return render_template('map.html', pageName="Expo Map", emailForm=emailForm(), mapType=theDatabase.getMapType())
def semesters(): if (request.method == 'POST'): files = request.files['file'] processSection(files) return render_template('semesters.html', pageName="Semesters", emailForm=emailForm(), entries=theDatabase.getAllSemesters(), currentSemester=theDatabase.getCurrentSemester(), registration=theDatabase.getRegistrationButton())
def projectsSem(semester): cooks = request.cookies.get("favs") if cooks is not None: favUCooks = cooks.split(",") favCooks = [] for a in favUCooks: favCooks.append(str(a)) return render_template( 'projects.html', favs=favCooks, entries=theDatabase.getAllEntriesWithSubmissionNums(semester), pageName="Projects", emailForm=emailForm()) return render_template( 'projects.html', favs=[], entries=theDatabase.getAllEntriesWithSubmissionNums(semester), pageName="Projects", emailForm=emailForm())
def projects(): tablesTable() if (request.method == 'POST'): if (request.form['type'] == "DP"): theDatabase.delProj(request.form['projKey']) elif (request.form['type'] == "tables"): files = request.files['file'] processTables(files) return render_template( 'projects.html', entries=theDatabase.getAllEntriesWithSubmissionNums(), pageName="Projects", emailForm=emailForm())
def schedule(): if (request.method == 'POST'): if (request.form['type'] == "Sch"): theDatabase.editSchedule(request.form['editSchTip']) elif (request.form['type'] == "busSch"): theDatabase.editBusSchedule(request.form['editBusSchTip']) elif (request.form['type'] == "endSch"): theDatabase.editSchEnd(request.form['editEndSchTip']) return render_template('schedule.html', schedule=theDatabase.getSchedule(), busSchedule=theDatabase.getBusSchedule(), schEnd=theDatabase.getSchEnd(), pageName="Spring 2014 Expo Schedule", emailForm=emailForm())
def map(): if (request.method=='POST'): if request.form.get('rainMap'): theDatabase.setMapCanvas(request.form.get("rainMap"), "rainMap") elif request.form.get("normalMap"): theDatabase.setMapCanvas(request.form.get("normalMap"), "normalMap") if (request.method=='GET'): print("GET") print(request.args.keys()) if request.args.get('rainMap'): return Response(theDatabase.getMapCanvas("rainMap"), status=200) elif request.args.get("normalMap"): print(theDatabase.getMapCanvas("normalMap")) return theDatabase.getMapCanvas("normalMap") #return Response(theDatabase.getMapCanvas("normalMap"), status=200) print("HERE") return render_template('map.html', pageName="Expo Map", emailForm=emailForm(), rainSerialized=theDatabase.getMapCanvas(map="rainMap"), normalSerialized=theDatabase.getMapCanvas(map="normalMap"))
def map(): if (request.method == 'POST'): if request.form.get('rainMap'): theDatabase.setMapCanvas(request.form.get("rainMap"), "rainMap") elif request.form.get("normalMap"): theDatabase.setMapCanvas(request.form.get("normalMap"), "normalMap") if (request.method == 'GET'): print("GET") print(request.args.keys()) if request.args.get('rainMap'): return Response(theDatabase.getMapCanvas("rainMap"), status=200) elif request.args.get("normalMap"): print(theDatabase.getMapCanvas("normalMap")) return theDatabase.getMapCanvas("normalMap") #return Response(theDatabase.getMapCanvas("normalMap"), status=200) print("HERE") return render_template( 'map.html', pageName="Expo Map", emailForm=emailForm(), rainSerialized=theDatabase.getMapCanvas(map="rainMap"), normalSerialized=theDatabase.getMapCanvas(map="normalMap"))
def semesters(): if(request.method =='POST'): files = request.files['file'] processSection(files) return render_template('semesters.html', pageName="Semesters", emailForm=emailForm(), entries=theDatabase.getAllSemesters(), currentSemester = theDatabase.getCurrentSemester(), registration = theDatabase.getRegistrationButton())
def projects(): return render_template( 'projects.html', entries=theDatabase.getAllEntriesWithSubmissionNums(), pageName="Projects", emailForm=emailForm())
def seeliogallerySem(semester): return render_template('seeliogallery.html', pageName="Seelio", emailForm=emailForm(), sKey=theDatabase.getCurrentSeelioKey(semester))
def schedule(): return render_template('schedule.html', pageName="Spring 2014 Expo Schedule", emailForm=emailForm())
def map(): return render_template('map.html', pageName="Expo Map", emailForm=emailForm())
def seeliogallery(): return render_template('seeliogallery.html', pageName="Seelio", emailForm=emailForm())
def tips(): return render_template('tips.html', pageName="Tips", emailForm=emailForm())
def social(): return render_template('social.html', pageName="Social", emailForm=emailForm())
def search(searchString): return render_template('projects.html', entries=theDatabase.search(searchString), pageName="Search Results", searchTitle="Search Results for: " + "\""+searchString +"\"", emailForm=emailForm())
def tips(): if(request.method=='POST'): if(request.form['type']=="J"): theDatabase.addJudTip(request.form['newTip']) elif(request.form['type']=="V"): theDatabase.addVisTip(request.form['newTip']) elif(request.form['type']=="S"): theDatabase.addStuTip(request.form['newTip']) elif(request.form['type']=="VE"): theDatabase.editVTip(request.form['editVTip'],request.form['vKey']) elif(request.form['type']=="SE"): theDatabase.editSTip(request.form['editSTip'],request.form['sKey']) elif(request.form['type']=="JE"): theDatabase.editJTip(request.form['editJTip'],request.form['jKey']) elif(request.form['type']=="JD"): theDatabase.delJTip(request.form['jKey']) elif(request.form['type']=="SD"): theDatabase.delSTip(request.form['sKey']) elif(request.form['type']=="VD"): theDatabase.delVTip(request.form['vKey']) return render_template('tips.html', vTips = theDatabase.getAllVTips(),sTips = theDatabase.getAllSTips(), jTips = theDatabase.getAllJTips(), pageName="Tips", emailForm=emailForm())
def projectdetails(submissionNum): return render_template('projectdetails.html', submission=theDatabase.getOneSubmission(submissionNum), pageName="Project Details", emailForm=emailForm())
def schedule(): if(request.method=='POST'): if(request.form['type']=="Sch"): theDatabase.editSchedule(request.form['editSchTip']) elif(request.form['type']=="busSch"): theDatabase.editBusSchedule(request.form['editBusSchTip']) elif(request.form['type']=="endSch"): theDatabase.editSchEnd(request.form['editEndSchTip']) return render_template('schedule.html', schedule=theDatabase.getSchedule(), busSchedule=theDatabase.getBusSchedule(), schEnd=theDatabase.getSchEnd(), pageName="Spring 2014 Expo Schedule", emailForm=emailForm())
def judging(): return render_template('judging.html', entries=theDatabase.getAllEntriesWithSubmissionNums(), pageName="Judging", emailForm=emailForm())
def checkin(): return render_template('checkin.html', entries=theDatabase.getAllEntriesWithSubmissionNums(), pageName="Check-in", emailForm=emailForm())
def projects(): tablesTable() if(request.method=='POST'): if(request.form['type']=="DP"): theDatabase.delProj(request.form['projKey']) elif(request.form['type']=="tables"): files=request.files['file'] processTables(files) return render_template('projects.html', entries=theDatabase.getAllEntriesWithSubmissionNums(), pageName="Projects", emailForm=emailForm())
def projectdetails(submissionNum): return render_template( 'projectdetails.html', submission=theDatabase.getOneSubmission(submissionNum), pageName="Project Details", emailForm=emailForm())
def projects(): return render_template('projects.html', entries=theDatabase.getAllEntriesWithSubmissionNums(), pageName="Projects", emailForm=emailForm())