示例#1
0
文件: views.py 项目: gmist/solostyle
def show_jobs():
    jobs = Job.query(Job.is_public == True).order(-Job.created)
    return render_template(
        'about/jobs.html',
        html_class='about_page',
        jobs=jobs
    )
示例#2
0
def add():
    form = JobForm()
    if request.method == 'POST' and form.validate_on_submit():
        new_job = Job()
        form.populate_obj(new_job)
        new_job.put()
        return redirect(url_for('about.admins.jobs.index'))
    jobs = Job.query().order(-Job.created)
    return render_template(
        'about/admins/jobs/add.html',
        jobs=jobs,
        form=form
    )
示例#3
0
def index():
    jobs = Job.query().order(-Job.created)
    return render_template(
        'about/admins/jobs/index.html',
        jobs=jobs
    )