From 6f121f09d0e001648a446a8aebf0c343ef345c7c Mon Sep 17 00:00:00 2001 From: chirac Date: Wed, 30 Dec 2020 19:29:56 +0100 Subject: [PATCH] Add autocomplete on multiop --- multi_op/preferences/forms.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/multi_op/preferences/forms.py b/multi_op/preferences/forms.py index 406a9c3b..30aceb36 100644 --- a/multi_op/preferences/forms.py +++ b/multi_op/preferences/forms.py @@ -29,6 +29,7 @@ each. from django import forms from django.forms import ModelForm, Form from django.utils.translation import ugettext_lazy as _ +from re2o.mixins import AutocompleteMultipleModelMixin from .models import MultiopOption @@ -39,3 +40,8 @@ class EditMultiopOptionForm(ModelForm): class Meta: model = MultiopOption fields = "__all__" + widgets = { + "enabled_dorm": AutocompleteMultipleModelMixin( + url="/topologie/dormitory-autocomplete", + ), + }