comparison ygroup/search_indexes.py @ 581:ee87ea74d46b

For Django 1.4, rearranged project structure for new manage.py.
author Brian Neal <bgneal@gmail.com>
date Sat, 05 May 2012 17:10:48 -0500
parents gpp/ygroup/search_indexes.py@3b30286adba5
children ad53d929281a
comparison
equal deleted inserted replaced
580:c525f3e0b5d0 581:ee87ea74d46b
1 """
2 Haystack search index for the Yahoo Group archives application.
3
4 """
5 from haystack.indexes import *
6 from haystack import site
7 from custom_search.indexes import CondQueuedSearchIndex
8
9 from ygroup.models import Post
10
11
12 class PostIndex(CondQueuedSearchIndex):
13 text = CharField(document=True, use_template=True)
14 pub_date = DateTimeField(model_attr='creation_date')
15
16 def get_updated_field(self):
17 return 'creation_date'
18
19
20 site.register(Post, PostIndex)