(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).
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).
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 ) .
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.")
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." )