Mercurial > public > sg101
comparison custom_search/views.py @ 1032:e932f2ecd4a7
Django 1.8 warnings / tech debt cleanup.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 26 Dec 2015 15:10:55 -0600 |
parents | 840c1a8bd8af |
children | 829d3b7fc0f7 |
comparison
equal
deleted
inserted
replaced
1031:e1c03da72818 | 1032:e932f2ecd4a7 |
---|---|
1 """Custom views for searching.""" | 1 """Custom views for searching.""" |
2 import logging | 2 import logging |
3 | 3 |
4 from django.shortcuts import render_to_response | 4 from django.shortcuts import render |
5 from haystack.views import SearchView | 5 from haystack.views import SearchView |
6 from xapian import QueryParserError | 6 from xapian import QueryParserError |
7 | 7 |
8 logger = logging.getLogger(__name__) | 8 logger = logging.getLogger(__name__) |
9 | 9 |
44 'paginator': None, | 44 'paginator': None, |
45 'suggestion': None, | 45 'suggestion': None, |
46 } | 46 } |
47 | 47 |
48 context.update(self.extra_context()) | 48 context.update(self.extra_context()) |
49 return render_to_response(self.template, context, | 49 return render(self.request, self.template, context) |
50 context_instance=self.context_class(self.request)) | |
51 | 50 |
52 def extra_context(self): | 51 def extra_context(self): |
53 return { | 52 return { |
54 'query_parser_error': self.query_parser_error, | 53 'query_parser_error': self.query_parser_error, |
55 } | 54 } |