Beispiel #1
0
def organisation_add():
    form = OrganisationsForm()
    if form.validate_on_submit():
        organisation = Organisations(form.name.data)
        organisation.description = form.description.data

        db.session.add(organisation)
        db.session.commit()
        flash(_("Organisation added"))
        return redirect(url_for("organisations.organisation"))
    return render_template("organisation_add.html", form=form)