(request)
return my_render('juser/group_list.html', locals(), request)
list user group
    用户组列表
list user group
    用户组列表
list user group 用户组列表
def group_list(request):
    """
    list user group
    用户组列表
    """
    header_title, path1, path2 = '查看用户组', '用户管理', '查看用户组'
    keyword = request.GET.get('search', '')
    user_group_list = UserGroup.objects.all().order_by('name')
    group_id = request.GET.get('id', '')

    if keyword:
        user_group_list = user_group_list.filter(Q(name__icontains=keyword) | Q(comment__icontains=keyword))

    if group_id:
        user_group_list = user_group_list.filter(id=int(group_id))

    user_group_list, p, user_groups, page_range, current_page, show_first, show_end = pages(user_group_list, request)
    return my_render('juser/group_list.html', locals(), request)
def group_list ( request ) : header_title , path1 , path2 = '查看用户组', '用户管理',  ' 看用户组' keyword = request . GET . get ( 'search' , '' ) user_group_list = UserGroup . objects . all ( ) . order_by ( 'name' ) group_id = request . GET . get ( 'id' , '' ) if keyword : user_group_list = user_group_list . filter ( Q ( name__icontains = keyword ) | Q ( comment__icontains = keyword ) ) if group_id : user_group_list = user_group_list . filter ( id = int ( group_id ) ) user_group_list , p , user_groups , page_range , current_page , show_first , show_end = pages ( user_group_list , request ) return my_render ( 'juser/group_list.html' , locals ( ) , request )