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")
Ejemplo n.º 2
0
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")
Ejemplo n.º 4
0
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")