code: def admin_url(model, url, object_id=None):
      
      opts = model._meta
      url = "admin:%s_%s_%s" % (opts.app_label, opts.object_name.lower(), url)
      args = ()
      if object_id is not None:
          args = (object_id,)
      return reverse(url, args=args)
docs: Returns the URL for the given model and admin url name.