def index(): colors = database.get_colors() for c in colors: print str(c[1]) + " " + str(c[2]) old_timestamp = request.cookies.get('date_visited') response = make_response(render_template('index.html', date_visited=old_timestamp, color_list=colors)) timestamp = get_time_and_date() response.set_cookie('date_visited', timestamp) return response
def admin_display(): # requires session to be set for it to work if session['successful_load'] == 'true': # obtain all necessary information for the admin page and # render the admin template #will have all info from db passed into it courses = database.get_courses() languages = database.get_languages() projects = database.get_projects() work = database.get_work_experience() colors = database.get_colors() # Remove session session['successful_load'] = 'false' return render_template('admin.html', course_list=courses, language_list=languages, \ project_list=projects, work_list=work) else: return 'You are not authorized to access this page'
def show_contact_page(): colors = database.get_colors() return render_template('contact.html', color_list=colors)
def show_languages(): colors = database.get_colors() languages = database.get_languages() return render_template('languages.html', language_list=languages, color_list=colors)
def show_work(): colors = database.get_colors() work = database.get_work_experience() return render_template('work.html', work_list=work, color_list=colors)
def show_projects(): colors = database.get_colors() projects = database.get_projects() return render_template('projects.html', project_list=projects, color_list=colors)
def show_education(): colors = database.get_colors() courses = database.get_courses() return render_template('education.html', course_list=courses, color_list=colors)