def groups_option(f):
    new_func = click.option("-g", "--groups",
                            help="Comma-separated list of requirement groups "
                            "to include.")(f)
    return update_wrapper(new_func, f)
def add_group():
    form = AddGroupForm()
    if form.validate_on_submit():
        form.save()
        flash(_("Group added."), "success")
        return redirect(url_for("management.groups"))

    return render_template("management/group_form.html", form=form,
                           title=_("Add Group"))