From d9ea5e5538a15fc5334f6993626fa80ccf2998c1 Mon Sep 17 00:00:00 2001 From: Sli Date: Sun, 20 Oct 2024 22:41:35 +0200 Subject: [PATCH] Remove ajax_select from trombi --- trombi/views.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/trombi/views.py b/trombi/views.py index 8dd889cc..c5a1d205 100644 --- a/trombi/views.py +++ b/trombi/views.py @@ -24,7 +24,6 @@ from datetime import date -from ajax_select.fields import AutoCompleteSelectField from django import forms from django.conf import settings from django.contrib.auth.mixins import LoginRequiredMixin @@ -49,6 +48,7 @@ from core.views import ( TabedViewMixin, ) from core.views.forms import SelectDate +from core.views.widgets.select import AutoCompleteSelectUser from trombi.models import Trombi, TrombiClubMembership, TrombiComment, TrombiUser @@ -147,8 +147,12 @@ class TrombiEditView(CanEditPropMixin, TrombiTabsMixin, UpdateView): class AddUserForm(forms.Form): - user = AutoCompleteSelectField( - "users", required=True, label=_("Select user"), help_text=None + user = forms.ModelChoiceField( + label=_("Select user"), + help_text=None, + required=True, + widget=AutoCompleteSelectUser, + queryset=User.objects.all(), )