From 9df9179c4ed0bd1f526311941591edb9f4f834b4 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", + ), + }