Skip to content

Commit

Permalink
Updated search.py to include tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
lethain committed Feb 24, 2009
1 parent a677661 commit b164610
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions search.py
Expand Up @@ -4,7 +4,13 @@
class EntryDocument(solango.SearchDocument):
date = solango.fields.DateField()
title = solango.fields.CharField(copy=True)
tags = solango.fields.CharField(copy=True)
content = solango.fields.TextField(copy=True)

def transform_tags(self, instance):
tags = list(intance.tags.all())
texts = [ tag.title for tag in tags ]
return ",".join(texts)

def transform_date(self, instance):
return instance.pub_date
Expand Down

0 comments on commit b164610

Please sign in to comment.