{% load extra_urls i18n admin_static admin_list admin_urls %} {% for method_name, urlattrs in adminform.model_admin.extra_detail_buttons %} {% has_permission urlattrs.perm as authorized %} {% if authorized and urlattrs.visible %} {% nlless %} {% if icon %}   {% endif %} {{ urlattrs.label }} {% endnlless %} {% endif %} {% endfor %}