示例#1
0
def worship1():
    worship = Worship(name='Worship Test',
                      week_day='sunday',
                      schedule='09:00',
                      pastor='Abriran Abilu')
    worship.put()
    return worship
示例#2
0
def new():
    method = 'POST'
    action = '.'
    form = WorshipForm(request.form)
    if form.validate_on_submit():
        worship = Worship()
        form.populate_obj(worship)
        worship.put()
        flash('Worship created!')
        return redirect(url_for('.index'))
    return render_template("worships/new.html",
                           form=form,
                           method=method,
                           action=action)