html - Formatting data in table -
currently using flask-admin, data quite long per column, i'm wondering how format each line goes underneath after length. instead of
firstname
johndoeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
transform format.
firstname
johndoeeeeee
eeeeeeeeeeee
eeeeeeeeeeee
you can use column_formatters
in flask-admin.
class exampelmodelview(modelview): # ... def _format_first_name(view, context, model, name): formatted_first_name = procedure_to_format_first_name(model.first_name) return formatted_first_name column_formatters = {"first_name": _format_first_name} # ...
Comments
Post a Comment