parameters: (self, request, *args, **kwargs)
docstring: Eventually this will give a page that displays a list of results for each site.
          For now, just redirect either to a Pcap file, or to a SearchView populated with
          the flow results (depending on the search type).
docstring_summary: Eventually this will give a page that displays a list of results for each site.
          For now, just redirect either to a Pcap file, or to a SearchView populated with
          the flow results (depending on the search type).
docstring_tokens: Eventually this will give a page that displays a list of results for each site . For now just redirect either to a Pcap file or to a SearchView populated with the flow results ( depending on the search type ) .
function: def dispatch(self, request, *args, **kwargs):
          """Eventually this will give a page that displays a list of results for each site.
          For now, just redirect either to a Pcap file, or to a SearchView populated with
          the flow results (depending on the search type).
          """
  
          try:
              search = SearchInfo.objects.get(id=args[0])
          except SearchInfo.DoesNotExist:
              # No search, no page.
              raise Http404
  
          if search.type == search.T_FLOW:
              # Redirect to a flow result page.
              return HttpResponseRedirect(reverse('search_head_gui:search', [search.id]))
          elif search.type == search.T_PCAP:
              return HttpResponseRedirect(search.file.url())
          else:
              raise RuntimeError("Invalid search type.")
function_tokens: def dispatch ( self , request , * args , * * kwargs ) : try : search = SearchInfo . objects . get ( id = args [ 0 ] ) except SearchInfo . DoesNotExist : # No search, no page. raise Http404 if search . type == search . T_FLOW : # Redirect to a flow result page. return HttpResponseRedirect ( reverse ( 'search_head_gui:search' , [ search . id ] ) ) elif search . type == search . T_PCAP : return HttpResponseRedirect ( search . file . url ( ) ) else : raise RuntimeError ( "Invalid search type." )