def handle_GET(self, request, context):
        search_form = context['search_form']
        
        if not (request.GET and search_form.is_valid()):
            # No form data received
            return self.render(request, context, 'library/item_list')
        
        # Build a query object to pass to providers here
        try:
            query = LibrarySearchQuery(
                search_form.cleaned_data['title'],
                search_form.cleaned_data['author'],
                search_form.cleaned_data['isbn']
            )
        except LibrarySearchQuery.InconsistentQuery, e:
            return self.handle_error(request, context, e.msg)
        
        # Call provider
        try:
            results = self.conf.provider.library_search(query)
        except LibrarySearchError as e:
            return self.handle_error(request, context, e.message)
        
        # Paginate results
        paginator = Paginator(results, 10)
        
        try:
            page_index = int(request.GET['page'])
        except (ValueError, __HOLE__):
            page_index = 1
        else:
            page_index = min(max(1, page_index), paginator.num_pages)
        
        page = paginator.page(page_index)
        
        # Add cover image
        if hasattr(self.conf, 'additional_metadata_provider'):
            
            self.conf.additional_metadata_provider.annotate(page.object_list)
        
        # Without this, the object_list doesn't render when using fragment
        # rendering...
        page.object_list = list(page.object_list)
        
        # Render results page
        context.update({
            'removed': query.removed,
            'results': paginator,
            'page': page,
        })
        return self.render(request, context, 'library/item_list',
                           expires=timedelta(hours=1))
dataset/ETHPy150Open mollyproject/mollyproject/molly/apps/library/views.py/SearchDetailView.handle_GET