Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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,))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #admin #url #instance #django
ADD COMMENT
Topic
Name
8+5 =