handlers.py
changeset 74 1ab95857d584
parent 73 5a7188bf2894
child 75 c5ce145fdd70
equal deleted inserted replaced
73:5a7188bf2894 74:1ab95857d584
   170         Display the search form for the channel for GET, or do the search for POST
   170         Display the search form for the channel for GET, or do the search for POST
   171     """
   171     """
   172 
   172 
   173     # got a search query?
   173     # got a search query?
   174     if q :
   174     if q :
   175         # do search
   175         try :
   176         lines = search_index.search_simple(channel, q, count, skip)
   176             # do search
   177 
   177             lines = search_index.search_simple(channel, q, count, skip)
   178         # format
   178         
   179         lines = formatter.format_html(lines, full_timestamps=True)
   179         except log_search.NoResultsFound :
       
   180             # no lines
       
   181             lines = None
       
   182 
       
   183         else :
       
   184             # format
       
   185             lines = formatter.format_html(lines, full_timestamps=True)
   180 
   186 
   181     else :
   187     else :
   182         lines = None
   188         lines = None
   183     
   189     
   184     # render
   190     # render
   191         skip            = skip,
   197         skip            = skip,
   192         max             = max,
   198         max             = max,
   193         lines           = lines,
   199         lines           = lines,
   194     )
   200     )
   195 
   201 
   196 
       
   197