flask_admin.helpers

get_current_view()[源代码]

Get current administrative view.

Forms

is_required_form_field(field)[源代码]

Check if form field has DataRequired or InputRequired validators.

参数:field – WTForms field to check
is_form_submitted()[源代码]

Check if current method is PUT or POST

validate_form_on_submit(form)[源代码]

If current method is PUT or POST, validate form and return validation status.

get_form_data()[源代码]

If current method is PUT or POST, return concatenated request.form with request.files or None otherwise.

is_field_error(errors)[源代码]

Check if wtforms field has error without checking its children.

参数:errors – Errors list.

Jinja2 helpers

resolve_ctx(context)[源代码]

Resolve current Jinja2 context and store it for general consumption.

get_render_ctx()[源代码]

Get view template context.