@require_role('admin')
def group_list(request):
 (header_title, path1, path2) = (u'\u67e5\u770b\u8d44\u4ea7\u7ec4', u'\u8d44\u4ea7\u7ba1\u7406', u'\u67e5\u770b\u8d44\u4ea7\u7ec4')
 keyword = request.GET.get('keyword', '')
 asset_group_list = AssetGroup.objects.all()
 group_id = request.GET.get('id')
 if group_id:
  asset_group_list = asset_group_list.filter(id=group_id)
 if keyword:
  asset_group_list = asset_group_list.filter((Q(name__contains=keyword) | Q(comment__contains=keyword)))
 (asset_group_list, p, asset_groups, page_range, current_page, show_first, show_end) = pages(asset_group_list, request)
 return my_render('jasset/group_list.html', locals(), request)

@ require_role ( 'admin' ) def group_list ( request ) : ( header_title , path1 , path2 ) = ( u'\u67e5\u770b\u8d44\u4ea7\u7ec4' , u'\u8d44\u4ea7\u7ba1\u7406' , u'\u67e5\u770b\u8d44\u4ea7\u7ec4' ) keyword = request . GET . get ( 'keyword' , '' ) asset_group_list = AssetGroup . objects . all ( ) group_id = request . GET . get ( 'id' ) if group_id : asset_group_list = asset_group_list . filter ( id = group_id ) if keyword : asset_group_list = asset_group_list . filter ( ( Q ( name__contains = keyword ) | Q ( comment__contains = keyword ) ) ) ( asset_group_list , p , asset_groups , page_range , current_page , show_first , show_end ) = pages ( asset_group_list , request ) return my_render ( 'jasset/group_list.html' , locals ( ) , request )
list user group .