Skip to content

Commit

Permalink
Optomized search results so that they don't have to hit the DB.
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobian committed Feb 2, 2011
1 parent 6ad5c64 commit 8b182ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion django_website/docs/templates/docs/search.html
Expand Up @@ -26,7 +26,7 @@ <h2>Results</h2>
<div id="search-results">
{% for result in page.object_list %}
<h3>
<a href="{{ result.object.get_absolute_url }}">{{ result.object.title }}</a>
<a href="{% url document-detail lang=result.lang version=result.version url=result.path %}">{{ result.title }}</a>
</h3>
<p>{% highlight result.text with query max_length 200 %}</p>
{% empty %}
Expand Down
1 change: 1 addition & 0 deletions django_website/docs/views.py
Expand Up @@ -67,6 +67,7 @@ def __init__(self, **kwargs):
kwargs.update({
'template': 'docs/search.html',
'form_class': DocSearchForm,
'load_all': False,
})
super(DocSearchView, self).__init__(**kwargs)

Expand Down

0 comments on commit 8b182ef

Please sign in to comment.