specify some fts_fields

This commit is contained in:
Sanj 2011-10-24 01:19:04 +01:00
parent 17ed7fb25f
commit 48930f0522
2 changed files with 7 additions and 0 deletions

View File

@ -118,7 +118,9 @@ class BestPracticeFAQ(ItfModel):
question = models.TextField()
answer = models.TextField()
title_field = 'question'
fts_fields = ['question', 'answer']
def __unicode__(self):
return self.question
@ -193,6 +195,8 @@ class Guideline(ItfModel):
title = models.CharField(max_length=512)
text = models.TextField()
fts_fields = ['title', 'text']
def get_dict(self):
return {
'title': self.title,
@ -220,6 +224,7 @@ class Glossary(ItfModel):
term = models.CharField(max_length=256)
definition = models.TextField()
title_field = 'term'
fts_fields = ['term', 'definition']
def get_dict(self):
return {

View File

@ -7,6 +7,8 @@ $('#listLeft ul li a').live("click", function() {
var objId = $(this).attr("data-id");
var tab = $('.innerSelected').attr("data-slug");
var formData = getSearchFormJSON();
$('#textRight').text("Loading...");
$('#bottomRight').text("Loading...");
formData.object_id = objId;
var urlString = JSONtoQueryString(formData);
History.pushState(formData, "", urlString);