Mercurial > public > sg101
comparison gpp/ygroup/search_indexes.py @ 323:0c18dfb1da1c
Fixing #149; adding the ygroup application: an archive of the old Yahoo Group messages.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 20 Feb 2011 00:31:54 +0000 |
parents | |
children | 79240675b903 |
comparison
equal
deleted
inserted
replaced
322:c3d3d7114749 | 323:0c18dfb1da1c |
---|---|
1 """ | |
2 Haystack search index for the Yahoo Group archives application. | |
3 | |
4 """ | |
5 from haystack.indexes import * | |
6 from haystack import site | |
7 | |
8 from ygroup.models import Post | |
9 | |
10 | |
11 class PostIndex(SearchIndex): | |
12 text = CharField(document=True, use_template=True) | |
13 pub_date = DateTimeField(model_attr='creation_date') | |
14 | |
15 def get_updated_field(self): | |
16 return 'creation_date' | |
17 | |
18 | |
19 site.register(Post, PostIndex) |