def success(message, **kwargs):
    kwargs["fg"] = kwargs.get("fg", "green")
    click.secho(message, **kwargs)
def add_category():
    form = CategoryForm()

    if form.validate_on_submit():
        form.save()
        flash(_("Category added."), "success")
        return redirect(url_for("management.forums"))

    return render_template("management/category_form.html", form=form,
                           title=_("Add Category"))