Skip to content

Commit fd28613

Browse files
author
Ivan Plesskih
committed
Some decorative fixes
1 parent ca168dc commit fd28613

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

django_object_actions/templates/django_object_actions/change_form.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{% block object-tools-items %}
55
{% for tool in objectactions %}
66
<li class="objectaction-item" data-tool-name="{{ tool.name }}">
7-
<a href='{%url tools_view_name pk=object_id tool=tool.name %}' title="{{ tool.standard_attrs.title }}"
7+
<a href='{% url tools_view_name pk=object_id tool=tool.name %}' title="{{ tool.standard_attrs.title }}"
88
{% for k, v in tool.custom_attrs.items %}
99
{{ k }}="{{ v }}"
1010
{% endfor %}

django_object_actions/utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ def get_tool_urls(self, urls):
2222
tools = {}
2323

2424
end = '_change'
25-
for u in urls:
26-
if u.name.endswith(end):
27-
tools_view = u.name[:-len(end)] + '_tools'
28-
change_view = 'admin:' + u.name
25+
for url_pattern in urls:
26+
if url_pattern.name.endswith(end):
27+
tools_view = url_pattern.name[:-len(end)] + '_tools'
28+
change_view = 'admin:' + url_pattern.name
2929
self.tools_view_name = 'admin:' + tools_view
3030
break
3131

0 commit comments

Comments
 (0)