SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 581b75ef authored by Jorran de Wit's avatar Jorran de Wit
Browse files

Merge branch 'search'

parents 6fa15b16 bdee0485
No related branches found
No related tags found
No related merge requests found
...@@ -13,6 +13,10 @@ class PublicationIndex(indexes.SearchIndex, indexes.Indexable): ...@@ -13,6 +13,10 @@ class PublicationIndex(indexes.SearchIndex, indexes.Indexable):
date = indexes.DateTimeField(model_attr='publication_date') date = indexes.DateTimeField(model_attr='publication_date')
abstract = indexes.CharField(model_attr='abstract') abstract = indexes.CharField(model_attr='abstract')
doi_label = indexes.CharField(model_attr='doi_label') doi_label = indexes.CharField(model_attr='doi_label')
institutions = indexes.MultiValueField()
def prepare_institutions(self, obj):
return [inst.name for inst in obj.institutions.all()]
def get_model(self): def get_model(self):
return Publication return Publication
......
...@@ -4,3 +4,6 @@ ...@@ -4,3 +4,6 @@
{{object.abstract}} {{object.abstract}}
{{object.doi_string}} {{object.doi_string}}
{{object.citation}} {{object.citation}}
{% for institution in object.institutions.all %}
{{ institution.name }}
{% endfor %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment