1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-07-04 12:52:15 +02:00

All indexed fields are autocompleted

This commit is contained in:
Yohann D'ANELLO
2020-10-15 14:55:45 +02:00
parent 11ebc6848b
commit 980b2c9d8e
5 changed files with 13 additions and 11 deletions

View File

@ -4,10 +4,10 @@ from .models import Registration
class RegistrationIndex(indexes.SearchIndex, indexes.Indexable):
text = indexes.CharField(document=True, model_attr="user__username")
last_name = indexes.CharField(model_attr="user__last_name")
first_name = indexes.CharField(model_attr="user__first_name")
email = indexes.CharField(model_attr="user__email")
text = indexes.EdgeNgramField(document=True, model_attr="user__username")
last_name = indexes.EdgeNgramField(model_attr="user__last_name")
first_name = indexes.EdgeNgramField(model_attr="user__first_name")
email = indexes.EdgeNgramField(model_attr="user__email")
def get_model(self):
return Registration