📜  获取实例 django 的管理 url - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:40.650000             🧑  作者: Mango

代码示例1
from django.urls import reverse

info = (model_instance._meta.app_label, model_instance._meta.model_name)
admin_url = reverse('admin:%s_%s_change' % info, args=(model_instance.pk,))