You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
an example of how to send member_choices to get_item?
forms
@property
def member_choices(self):
""" return all members of the specific team """
members = self.team.team_users.all()
return members
@staticmethod
def get_items(search=None, values=None):
items = None
if search is not None:
items = list(filter(lambda x: x.get("value") in values, data))
return [{"label": x.label, "value": x.id} for x in items]
to = forms.CharField(
widget=widgets.Autocomplete(
name="to",
options=dict(
multiselect=True,
get_items=get_items,
minimum_search_length=0,
),
)
)
The text was updated successfully, but these errors were encountered:
Hi,
an example of how to send member_choices to get_item?
forms
The text was updated successfully, but these errors were encountered: