def admin_jobs(): splash = ''; if session.get('admin') == True: if request.method == 'POST': n = Job(request.form.get('title'), request.form.get('desc'), request.form.get('exp')) db_session.add(n) db_session.commit() splash='Job Created' return render_template('admin_jobs.html', SPLASH=splash) return redirect("/login?next=/admin_jobs")
def admin_news(): splash = '' if session.get('admin') == True: if request.method == 'POST': n = NewsPost(request.form.get('heading'), request.form.get('body')) db_session.add(n) db_session.commit() splash = 'News Post Created' return render_template('admin_news.html', SPLASH=splash) return redirect("/login?next=/admin_news")
def admin_news(): splash = ''; if session.get('admin') == True: if request.method == 'POST': n = NewsPost(request.form.get('heading'), request.form.get('body')) db_session.add(n) db_session.commit() splash='News Post Created' return render_template('admin_news.html', SPLASH=splash) return redirect("/login?next=/admin_news")
def admin_jobs(): splash = '' if session.get('admin') == True: if request.method == 'POST': n = Job(request.form.get('title'), request.form.get('desc'), request.form.get('exp')) db_session.add(n) db_session.commit() splash = 'Job Created' return render_template('admin_jobs.html', SPLASH=splash) return redirect("/login?next=/admin_jobs")