我创建了一个自定义管理模型:
class SettlementAdmin(admin.ModelAdmin, ExportCsvMixin):
list_display_links = ('player',)
def get_urls(self):
urls = super().get_urls()
my_urls = [
path('list/', self.settlements_list),
]
return my_urls + urls
def settlements_list(self, request):
....
admin.site.register(Settlement, SettlementAdmin)
我不确定如何在现有链接旁边的Django主页上包含指向该自定义模型的链接?