As I understand you trying create own view but I can't find any get
method in ModelView
.
Anyway flask-admin
have flexible inheritance structure. So you can try just:
class PostView(ModelView):
list_template = 'admin/model/posts-list.html'
templates/admin/model/posts-list.html:
{% extends 'admin/model/list.html' %}
{% block list_header %}
{{ super() }}
<th>Comments count</th>
{% endblock %}
{% block list_row %}
{{ super() }}
<td>{{ row.comments|length }}</td>
{% endblock %}