easyui/views.py
def get_menu_checked(self, request):
        """
        获取用户或者用户组checked的菜单列表
        usermenu_form.html 中定义
        usermenu  这两个model的定义类似，比如menus_checked和menus_show
        groupmenu
        @return  eg. ['1', '8', '9', '10' ]
        获取用户或者用户组的check_ids,会给出app_label, model_name, pk eg. /easyui/menulistview/?app_label=easyui&model_name=UserMenu&pk=1
        """
        checked_id = []
        qd = request.GET
        query_dict = dict(qd.items())
        if query_dict:
            #object = get_object(**query_dict)
            app_label = query_dict['app_label']
            model_name = query_dict['model_name']
            pk = query_dict['pk']
            model = get_model(app_label, model_name)
            object =  model.objects.get(pk=pk)
            checked_id = object.menus_checked.split(',')

        return checked_id
def get_menu_checked(self, request):
        """
        获取用户或者用户组checked的菜单列表
        usermenu_form.html 中定义
        usermenu  这两个model的定义类似，比如menus_checked和menus_show
        groupmenu
        @return  eg. ['1', '8', '9', '10' ]
        获取用户或者用户组的check_ids,会给出app_label, model_name, pk eg. /easyui/menulistview/?app_label=easyui&model_name=UserMenu&pk=1
        """
        checked_id = []
        qd = request.GET
        query_dict = dict(qd.items())
        if query_dict:
            #object = get_object(**query_dict)
            app_label = query_dict['app_label']
            model_name = query_dict['model_name']
            pk = query_dict['pk']
            model = get_model(app_label, model_name)
            object =  model.objects.get(pk=pk)
            checked_id = object.menus_checked.split(',')

        return checked_id
def get_menu_checked ( self , request ) : checked_id = [ ] qd = request . GET query_dict = dict ( qd . items ( ) ) if query_dict : #object = get_object(**query_dict) app_label = query_dict [ 'app_label' ] model_name = query_dict [ 'model_name' ] pk = query_dict [ 'pk' ] model = get_model ( app_label , model_name ) object = model . objects . get ( pk = pk ) checked_id = object . menus_checked . split ( ',' ) return checked_id
获取用户或者用户组checked的菜单列表
        usermenu_form.html 中定义
        usermenu  这两个model的定义类似，比如menus_checked和menus_show
        groupmenu
        @return  eg. ['1', '8', '9', '10' ]
        获取用户或者用户组的check_ids,会给出app_label, model_name, pk eg. /easyui/menulistview/?app_label=easyui&model_name=UserMenu&pk=1
获取用户或者用户组checked的菜单列表 usermenu_form . html 中定义 usermenu 这两个model的定义类似，比如menus_checked和menus_show groupmenu