22👍
✅
You can get the url in the view, using reverse
,
object_change_url = reverse('admin:myapp_mymodel_change', args=(obj.id,))
Or in the template, using the url tag
{% url 'admin:myapp_mymodel_change' obj.id %}
or
{% load admin_urls %}
{% url opts|admin_urlname:'change' obj.id %}">
Note the above url tag syntax is for Django >= 1.5.
For more information, see the Django docs on reversing admin urls.
Source:stackexchange.com