Skip to content

Commit 90cd571

Browse files
committed
Make quote usage more consistent
1 parent 7a7d464 commit 90cd571

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

django_admin_row_actions/admin.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ def to_dict(tool_name):
4040
items = []
4141

4242
row_actions = self.get_row_actions(obj)
43-
url_prefix = "{obj.pk if includePk else ''}/"
43+
url_prefix = f'{obj.pk if includePk else ""}/'
4444

4545
for tool in row_actions:
4646
if isinstance(tool, str): # Just a str naming a callable
4747
tool_dict = to_dict(tool)
4848
items.append({
4949
'label': tool_dict['label'],
50-
'url': f"{url_prefix}rowactions/{tool}/",
50+
'url': f'{url_prefix}rowactions/{tool}/',
5151
'method': tool_dict.get('POST', 'GET')
5252
})
5353

@@ -56,9 +56,9 @@ def to_dict(tool_name):
5656
if 'action' in tool: # If 'action' is specified then use our generic url in preference to 'url' value
5757
if isinstance(tool['action'], tuple):
5858
self._named_row_actions[tool['action'][0]] = tool['action'][1]
59-
tool['url'] = f"{url_prefix}rowactions/{tool['action'][0]}/"
59+
tool['url'] = f'{url_prefix}rowactions/{tool["action"][0]}/'
6060
else:
61-
tool['url'] = f"{url_prefix}rowactions/{tool['action']}/"
61+
tool['url'] = f'{url_prefix}rowactions/{tool["action"]}/'
6262
items.append(tool)
6363

6464
return items

django_admin_row_actions/components.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def __init__(self, **kwargs):
1515

1616
@classmethod
1717
def get_unique_id(cls):
18-
return f"{cls.__name__.lower()}-{len(cls.instances)}"
18+
return f'{cls.__name__.lower()}-{len(cls.instances)}'
1919

2020
def render(self):
2121
return render_to_string(

0 commit comments

Comments
 (0)