title: Django ModelChoiceField displaying values in django.contrib.auth and a Profile table
body: <p>I am extremely new to python or django. I inherited some code that needs some "fixing" and I could use some help.</p>
  
  <p>Here's the situation:</p>
  
  <p>We have a drop-down box from which you can choose multiple users. Currently, the users are displayed as usernames. We would like for them to be displayed as Full Names.</p>
  
  <p>The Issue:
  The username is coming from: <code>django.contrib.auth</code></p>
  
  <p>The First Name and Last Name are coming from the Profile Model. 
  Here's what the Profile Model looks like:</p>
  
  <pre><code>class Profile(models.Model):
  CURRENTLY_STUDENT = "STU"
  CURRENTLY_PROFESSOR = "PFR"
  CURRENTLY_CHOICES = [
      (CURRENTLY_STUDENT, "Student"),
      (CURRENTLY_PROFESSOR, "Professor"),
  ]
  
  user = models.OneToOneField(User, related_name="profile")
  currently_am = models.CharField(max_length=3, choices=CURRENTLY_CHOICES, default=CURRENTLY_STUDENT)
  first_name = models.CharField(max_length=50)
  last_name = models.CharField(max_length=50)
  </code></pre>
  
  <p>If you have to display a full name we use the following:</p>
  
  <pre><code>user.profile.display_name
  </code></pre>
  
  <p>where display_name is:</p>
  
  <pre><code>def display_name(self):
          name = "%s %s" % (self.first_name, self.last_name)
      return name
  </code></pre>
  
  <p>Following is the code for the drop-down box in forms.py:</p>
  
  <pre><code> from django import forms
   from django.contrib.auth.models import User
   from account.utils import user_display
  
  
  class UserMultipleChoiceField(forms.ModelMultipleChoiceField):
  
  def label_from_instance(self, obj):
      return user_display(obj)
  
  
  class ShareForm(forms.Form):
  
  participants = UserMultipleChoiceField(
      queryset=User.objects.none(),
      label="",
      widget=forms.SelectMultiple(
          attrs={
              "data-placeholder": "Choose members.. "
          }
      )
  )
  </code></pre>
  
  <p>Following is the code from account/utils.py for <code>user_display</code></p>
  
  <pre><code>from account.conf import settings
  
  def user_display(user):
  return settings.ACCOUNT_USER_DISPLAY(user)
  </code></pre>
  
  <p>and here's the code from account/conf.py</p>
  
  <pre><code>class AccountAppConf(AppConf):
  USER_DISPLAY = lambda user: user.username
  </code></pre>
  
  <ul>
  <li><p>You can't use <code>obj.get_full_name()</code> as the First Name and Last Name are not coming from django.contrib.auth instead they are stored in the above mentioned Profile Model.   </p></li>
  <li><p>You can't use return obj.profile.display_name() either as the ModelChoiceField is drawn on django.contrib.auth.</p></li>
  </ul>
  
  <p>Could somebody please help me with this? How can I display full-names in the drop-down boxes and still pass the "user" as the value once someone makes a choice from the dropdown and hits submit?</p>
  
  <p>Thank you for your help :)</p>