Merge pull request #95 from gpodder/dependabot/pip/python-dateutil-2.7.2
[mygpo.git] / mygpo / search / __init__.py
blobda7c66600404e09108a9670fd7f92179a53f38c9
1 default_app_config = 'mygpo.search.apps.SearchConfig'
3 # Field that should be indexed, with their levels per
4 # https://docs.djangoproject.com/en/1.11/ref/contrib/postgres/search/#weighting-queries
5 INDEX_FIELDS = {
6 'title': 'A',
7 'description': 'B',
10 def get_index_fields(podcast):
11 """ Returns a dict of the fields to be included in the search index """
12 return {field: getattr(podcast, field) for field in INDEX_FIELDS.keys()}