Skip to content

Commit 4191afd

Browse files
wolphcrccheck
authored andcommitted
feat: Make default labels prettier (#93)
With this change the default label changes from `some_action` to `Some action`
1 parent fb90869 commit 4191afd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

django_object_actions/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def _get_tool_dict(self, tool_name):
151151
standard_attrs, custom_attrs = self._get_button_attrs(tool)
152152
return dict(
153153
name=tool_name,
154-
label=getattr(tool, 'label', tool_name),
154+
label=getattr(tool, 'label', tool_name.replace('_', ' ').capitalize()),
155155
standard_attrs=standard_attrs,
156156
custom_attrs=custom_attrs,
157157
)

0 commit comments

Comments
 (0)