File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,25 @@ async def main():
106106 ]
107107 except TypeError :
108108 visible_filters = None
109+ # rich text columns
110+ try :
111+ rich_text_columns = [
112+ column
113+ for column in table ._meta .columns
114+ if column ._meta .name
115+ in BASE_CONFIG [capitalize_table_name ].get (
116+ "rich_text_columns" , None
117+ )
118+ ]
119+ except TypeError :
120+ rich_text_columns = None
121+ # link column
122+ link_column = [
123+ column
124+ for column in table ._meta .columns
125+ if column ._meta .name
126+ == BASE_CONFIG [capitalize_table_name ].get ("link_column" , None )
127+ ]
109128 # menu_group
110129 menu_group = BASE_CONFIG [capitalize_table_name ].get (
111130 "menu_group" , None
@@ -116,6 +135,8 @@ async def main():
116135 table_class = table ,
117136 visible_columns = visible_columns ,
118137 visible_filters = visible_filters ,
138+ rich_text_columns = rich_text_columns ,
139+ link_column = None if link_column == [] else link_column [0 ],
119140 menu_group = menu_group ,
120141 )
121142 )
Original file line number Diff line number Diff line change 88 # - actor_id
99 # - first_name
1010 # menu_group: Movies
11+ # link_column: first_name
1112 # Address:
1213 # visible_columns:
1314 # - address_id
@@ -18,6 +19,7 @@ tables:
1819 # - address
1920 # - city_id
2021 # menu_group: Location
22+ # rich_text_columns: address # it only works in the Text type column
2123 # City:
2224 # visible_columns:
2325 # - city_id
You can’t perform that action at this time.
0 commit comments