Answers for "get admin url of instance django"

0

get admin url of instance django

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,))
Posted by: Guest on June-15-2020

Python Answers by Framework

Browse Popular Code Answers by Language