1 ##############################################################################
2 # Copyright (c) 2019 Parker Berberian, Sawyer Bergeron, and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
10 from account.models import UserProfile
13 def get_user_field_opts():
15 'show_from_noentry': False,
17 'results_scrollable': True,
18 'selectable_limit': -1,
19 'placeholder': 'Search for other users',
25 def get_user_items(exclude=None):
26 qs = UserProfile.objects.select_related('user').exclude(user=exclude)
31 'expanded_name': up.full_name,
32 'small_name': up.user.username,
33 'string': up.email_addr