~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to wiki/models.py

  • Committer: Holger Rapp
  • Date: 2009-03-22 21:24:54 UTC
  • Revision ID: sirver@h566336-20090322212454-kgcadqq213hp4grh
First draft version of search using the sphinx search engine

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 
15
15
from tagging.fields import TagField
16
16
from tagging.models import Tag
 
17
from djangosphinx import SphinxSearch
17
18
 
18
19
from wlimages.models import Image
19
20
 
67
68
 
68
69
    tags = TagField()
69
70
 
 
71
    # Django sphinx 
 
72
    search = SphinxSearch(
 
73
        weights = {
 
74
            'title': 100,
 
75
            'summary': 80,
 
76
            'content': 50,
 
77
            }
 
78
        )
 
79
 
70
80
    class Meta:
71
81
        verbose_name = _(u'Article')
72
82
        verbose_name_plural = _(u'Articles')