~netlandish/django-wiki

8eebbdc0f49c232060541028c523a408fc7bace0 — Oscar Cortez 4 years ago 872eb67
Add weight into wiki Article fields
1 files changed, 2 insertions(+), 1 deletions(-)

M src/wiki/models/article.py
M src/wiki/models/article.py => src/wiki/models/article.py +2 -1
@@ 117,7 117,8 @@ class Article(models.Model):
                )
            ),
        ).filter(id=self.id).update(
            search_vector=SearchVector('wiki_title', 'wiki_body')
            search_vector=SearchVector('wiki_title', weight='A')
            + SearchVector('wiki_body', weight='B')
        )

    def get_children(self, max_num=None, user_can_read=None, **kwargs):