Exemple #1
0
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())
Exemple #2
0
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)
Exemple #3
0
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)
Exemple #4
0
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())
Exemple #5
0
def schedule():
    return render_template('schedule.html',
                           schedule=theDatabase.getSchedule(),
                           busSchedule=theDatabase.getBusSchedule(),
                           schEnd=theDatabase.getSchEnd(),
                           pageName="Spring 2014 Expo Schedule",
                           emailForm=emailForm())
Exemple #6
0
def tips():
    return render_template('tips.html',
                           vTips=theDatabase.getAllVTips(),
                           sTips=theDatabase.getAllSTips(),
                           jTips=theDatabase.getAllJTips(),
                           pageName="Tips",
                           emailForm=emailForm())
Exemple #7
0
def search(searchString):
    return render_template('projects.html',
                           entries=theDatabase.search(searchString),
                           pageName="Search Results",
                           searchTitle="Search Results for: " + "\"" +
                           searchString + "\"",
                           emailForm=emailForm())
Exemple #8
0
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())
Exemple #9
0
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())
Exemple #10
0
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())
Exemple #11
0
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())
Exemple #12
0
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())
Exemple #13
0
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())
Exemple #14
0
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())
Exemple #15
0
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"))
Exemple #16
0
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"))
Exemple #17
0
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())
Exemple #18
0
def projects():
    return render_template(
        'projects.html',
        entries=theDatabase.getAllEntriesWithSubmissionNums(),
        pageName="Projects",
        emailForm=emailForm())
Exemple #19
0
def seeliogallerySem(semester):
    return render_template('seeliogallery.html',
                           pageName="Seelio",
                           emailForm=emailForm(),
                           sKey=theDatabase.getCurrentSeelioKey(semester))
Exemple #20
0
def schedule():
    return render_template('schedule.html',
                           pageName="Spring 2014 Expo Schedule",
                           emailForm=emailForm())
Exemple #21
0
def map():
    return render_template('map.html',
                           pageName="Expo Map",
                           emailForm=emailForm())
Exemple #22
0
def seeliogallery():
    return render_template('seeliogallery.html',
                           pageName="Seelio",
                           emailForm=emailForm())
Exemple #23
0
def tips():
    return render_template('tips.html', pageName="Tips", emailForm=emailForm())
Exemple #24
0
def social():
    return render_template('social.html',
                           pageName="Social",
                           emailForm=emailForm())
Exemple #25
0
def search(searchString):
    return render_template('projects.html', entries=theDatabase.search(searchString), pageName="Search Results", searchTitle="Search Results for: " + "\""+searchString +"\"", emailForm=emailForm())
Exemple #26
0
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())
Exemple #27
0
def projectdetails(submissionNum):
    return render_template('projectdetails.html', submission=theDatabase.getOneSubmission(submissionNum), pageName="Project Details", emailForm=emailForm())
Exemple #28
0
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())
Exemple #29
0
def social():
    return render_template('social.html', pageName="Social", emailForm=emailForm())
Exemple #30
0
def schedule():
    return render_template('schedule.html', pageName="Spring 2014 Expo Schedule", emailForm=emailForm())
Exemple #31
0
def seeliogallery():
    return render_template('seeliogallery.html', pageName="Seelio", emailForm=emailForm())
Exemple #32
0
def tips():
    return render_template('tips.html', pageName="Tips", emailForm=emailForm())
Exemple #33
0
def judging():
    return render_template('judging.html', entries=theDatabase.getAllEntriesWithSubmissionNums(), pageName="Judging", emailForm=emailForm())
Exemple #34
0
def checkin():
    return render_template('checkin.html', entries=theDatabase.getAllEntriesWithSubmissionNums(), pageName="Check-in", emailForm=emailForm())
Exemple #35
0
def map():
    return render_template('map.html', pageName="Expo Map", emailForm=emailForm())
Exemple #36
0
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())
Exemple #37
0
def projectdetails(submissionNum):
    return render_template(
        'projectdetails.html',
        submission=theDatabase.getOneSubmission(submissionNum),
        pageName="Project Details",
        emailForm=emailForm())
Exemple #38
0
def projects():
    return render_template('projects.html', entries=theDatabase.getAllEntriesWithSubmissionNums(), pageName="Projects", emailForm=emailForm())