Commit ff887bd7 authored by Serge S. Koval's avatar Serge S. Koval

Updated documentation.

parent 589a238a
......@@ -79,11 +79,12 @@ class BaseModelView(BaseView, ActionsMixin):
two, you can do something like this::
class MyModelView(BaseModelView):
list_formatters = dict(price=lambda m, p: m.price*2)
list_formatters = dict(price=lambda c, m, p: m.price*2)
Callback function has following prototype::
def formatter(model, name):
def formatter(context, model, name):
# context is instance of jinja2.runtime.Context
# model is model instance
# name is property name
pass
......@@ -673,7 +674,7 @@ class BaseModelView(BaseView, ActionsMixin):
Returns value to be displayed in list view
:param context:
Jinja2 context
:py:class:`jinja2.runtime.Context`
:param model:
Model instance
:param name:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment