https://docs.djangoproject.com/en/dev/ref/contrib/admin/#reversing-admin-urls
经常会需要手动写admin的页面跳转
################
如何在admin页面中添加跳转按钮,例子如下:
from django.urls import revers
from django.utils.html import format_html
def action(self, obj):
url = reverse('admin:bills_bill_changelist')
click = f"location.href = {url!r}"
html = f'<input type="button" onclick="{click}" value="go-to-bills" />'
return format_html(html)