def get_layer_url(admin):
    """
    获取url配置
    """
    try:
        opts = admin.opts
        key = "admin:{}_{}_layer".format(opts.app_label, opts.model_name)
    except Exception:
        # 输出警告
        logging.warning(f"使用异步获取layer配置，需要让Admin继承AjaxAdmin")
        print(f"使用异步获取layer配置，需要让Admin继承AjaxAdmin")
        traceback.print_exc()
    return reverse(key)
获取url配置
simpleui/templatetags/simpletags.py