Skip to content
Browse files

Added description field to indexes as a stored field

  • Loading branch information...
1 parent 5f9b42c commit d3b75c7d47b69beb51219759863a3caa4e0c4d43 @notanumber notanumber committed Aug 10, 2010
View
2 haystack_static_pages/management/commands/crawl_static_pages.py
@@ -75,7 +75,7 @@ def handle(self, *args, **options):
page.description = meta.get('content', '')
else:
page.description = ''
- page.language = soup.html.get('lang') # TODO: Discuss how to do this for multilang
+ page.language = soup.html.get('lang')
page.content = soup.prettify()
page.save()
count += 1
View
1 haystack_static_pages/search_indexes.py
@@ -12,6 +12,7 @@ class StaticPageIndex(indexes.SearchIndex):
title = indexes.CharField(model_attr='title')
url = indexes.CharField(model_attr='url')
content = indexes.CharField(model_attr='content')
+ description = indexes.CharField(model_attr='description')
language = indexes.CharField(model_attr='language')

0 comments on commit d3b75c7

Please sign in to comment.
Something went wrong with that request. Please try again.