Repository: flask-admin/flask-admin

Issue:
column_formatters formatting details view as well? 
According to the docs, `column_formatters` is supposed to be formatting just the list views. 

> Dictionary of list view column formatters.

However, I realized that column_formatters is applies to details_view as well. 

Is this a feature or a bug? 

What can I do if I want to format a few specific columns in ONLY the list_view? 


Discussion:
You can see [details_view](https://github.com/flask-admin/flask-admin/blob/master/flask_admin/model/base.py#L2106)
and [get_list_value](https://github.com/flask-admin/flask-admin/blob/master/flask_admin/model/base.py#L1802)
I was also surprised to discover this. Did you find a solution, @vincentwhales?

Resolving patch:
diff --git a/flask_admin/model/base.py b/flask_admin/model/base.py
--- a/flask_admin/model/base.py
+++ b/flask_admin/model/base.py
@@ -263,6 +263,16 @@ def formatter(view, context, model, name):
         that macros are not supported.
     """
 
+    column_formatters_detail = None
+    """
+        Dictionary of list view column formatters to be used for the detail view.
+
+        Defaults to column_formatters when set to None.
+
+        Functions the same way as column_formatters except
+        that macros are not supported.
+    """
+
     column_type_formatters = ObsoleteAttr('column_type_formatters', 'list_type_formatters', None)
     """
         Dictionary of value type formatters to be used in the list view.
@@ -319,6 +329,18 @@ def type_formatter(view, value):
         Functions the same way as column_type_formatters.
     """
 
+    column_type_formatters_detail = None
+    """
+        Dictionary of value type formatters to be used in the detail view.
+
+        By default, two types are formatted:
+
+        1. ``None`` will be displayed as an empty string
+        2. ``list`` will be joined using ', '
+
+        Functions the same way as column_type_formatters.
+    """
+
     column_labels = ObsoleteAttr('column_labels', 'rename_columns', None)
     """
         Dictionary where key is column name and value is string to display.
@@ -889,6 +911,9 @@ def _refresh_cache(self):
         if self.column_formatters_export is None:
             self.column_formatters_export = self.column_formatters
 
+        if self.column_formatters_detail is None:
+            self.column_formatters_detail = self.column_formatters
+
         # Type formatters
         if self.column_type_formatters is None:
             self.column_type_formatters = dict(typefmt.BASE_FORMATTERS)
@@ -896,6 +921,9 @@ def _refresh_cache(self):
         if self.column_type_formatters_export is None:
             self.column_type_formatters_export = dict(typefmt.EXPORT_FORMATTERS)
 
+        if self.column_type_formatters_detail is None:
+            self.column_type_formatters_detail = dict(typefmt.DETAIL_FORMATTERS)
+
         if self.column_descriptions is None:
             self.column_descriptions = dict()
 
@@ -1803,6 +1831,26 @@ def get_list_value(self, context, model, name):
             self.column_type_formatters,
         )
 
+    @contextfunction
+    def get_detail_value(self, context, model, name):
+        """
+            Returns the value to be displayed in the detail view
+
+            :param context:
+                :py:class:`jinja2.runtime.Context`
+            :param model:
+                Model instance
+            :param name:
+                Field name
+        """
+        return self._get_list_value(
+            context,
+            model,
+            name,
+            self.column_formatters_detail,
+            self.column_type_formatters_detail,
+        )
+
     def get_export_value(self, model, name):
         """
             Returns the value to be displayed in export.
@@ -2103,7 +2151,7 @@ def details_view(self):
         return self.render(template,
                            model=model,
                            details_columns=self._details_columns,
-                           get_value=self.get_list_value,
+                           get_value=self.get_detail_value,
                            return_url=return_url)
 
     @expose('/delete/', methods=('POST',))
diff --git a/flask_admin/model/typefmt.py b/flask_admin/model/typefmt.py
--- a/flask_admin/model/typefmt.py
+++ b/flask_admin/model/typefmt.py
@@ -84,6 +84,13 @@ def dict_formatter(view, value):
     dict: dict_formatter,
 }
 
+DETAIL_FORMATTERS = {
+    type(None): empty_formatter,
+    list: list_formatter,
+    dict: dict_formatter,
+}
+
 if Enum is not None:
     BASE_FORMATTERS[Enum] = enum_formatter
     EXPORT_FORMATTERS[Enum] = enum_formatter
+    DETAIL_FORMATTERS[Enum] = enum_formatter


Test patch: