#NEWLINE# @ auth #NEWLINE# def _GET( self , * param , **params ) : #NEWLINE# #INDENT# if ( not validates_query ( self ) ) : #NEWLINE# #INDENT# self . logger . debug ( ( 'Failed to get account. the value of query is invalid. - query=%s' % self . input . q ) ) #NEWLINE# return web . badrequest ( self . view . alert ) #NEWLINE# #UNINDENT# if ( not validates_page ( self ) ) : #NEWLINE# #INDENT# self . logger . debug ( ( 'Failed to get account. the value of page is invalid. - page=%s' % self . input . p ) ) #NEWLINE# return web . badrequest ( params . view . alert ) #NEWLINE# #UNINDENT# if is_param ( self . input , 'q' ) : #NEWLINE# #INDENT# users = findbyand ( self . orm , self . input . q ) #NEWLINE# if ( not users ) : #NEWLINE# #INDENT# self . logger . debug ( ( 'Failed to get account. No such account. - query=%s' % self . input . q ) ) #NEWLINE# return web . nocontent ( ) #NEWLINE# #UNINDENT# self . view . search_value = self . input . q #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# users = findbyall ( self . orm ) #NEWLINE# self . view . search_value = '' #NEWLINE# if ( not users ) : #NEWLINE# #INDENT# self . logger . debug ( 'Failed to get account. No accounts found.' ) #NEWLINE# return web . notfound ( ) #NEWLINE# #UNINDENT# #UNINDENT# if is_param ( self . input , 'p' ) : #NEWLINE# #INDENT# start = int ( self . input . p ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# start = 0 #NEWLINE# #UNINDENT# pager = Pager ( users , start , USER_LIST_RANGE ) #NEWLINE# if ( not pager . exist_now_page ( ) ) : #NEWLINE# #INDENT# self . logger . debug ( ( 'Failed to get account. Could not find page - page=%s' % self . input . p ) ) #NEWLINE# return web . nocontent ( ) #NEWLINE# #UNINDENT# self . view . pager = pager #NEWLINE# if self . is_mode_input ( ) : #NEWLINE# #INDENT# locales = DEFAULT_LANGS . keys ( ) #NEWLINE# self . view . locales = locales #NEWLINE# self . view . user = new ( '' , '' , '' , '' , '' ) #NEWLINE# #UNINDENT# self . view . input = self . input #NEWLINE# return True