Ejemplo n.º 1
0
def edit(id):
    method = 'POST'
    action = '.'
    worship = Worship.get_by_id(id)
    form = WorshipForm(request.form, worship)
    if form.validate_on_submit():
        worship = Worship.get_by_id(id)
        form.populate_obj(worship)
        worship.put()
        flash('Worship updated!')
    return render_template("worships/edit.html", form=form, method=method, action=action)
Ejemplo n.º 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)
Ejemplo n.º 3
0
def edit(id):
    method = 'POST'
    action = '.'
    worship = Worship.get_by_id(id)
    form = WorshipForm(request.form, worship)
    if form.validate_on_submit():
        worship = Worship.get_by_id(id)
        form.populate_obj(worship)
        worship.put()
        flash('Worship updated!')
    return render_template("worships/edit.html",
                           form=form,
                           method=method,
                           action=action)
Ejemplo n.º 4
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)