title: How to change the ManyToManyField widget?
body: <p>I'm trying to change the default <code>ManyToManyField</code> widget into a <code>TextInput</code> and make it readonly. At the same time I'm trying to display the value(s) that the <code>ManyToManyField</code> used to have within the TextInput, but I can't seem to manage...these are my models:</p>
  
  <h2>Form</h2>
  
  <pre><code>class ParticipantInlineForm(forms.ModelForm):
  
      class Meta:
          model = Participant
          widgets = {
              'persons': forms.TextInput
          }
  
      def __init__(self, *args, **kwargs):
          super(ParticipantInlineForm, self).__init__(*args,**kwargs)
          instance = kwargs.get('instance')
          string = ''
          if instance:
              for person in instance.persons.all():
                  string = string + str(person)
              self.fields['persons'].initial = string
  </code></pre>
  
  <h2>Inline</h2>
  
  <pre><code>class SimpleParticipantInline(admin.TabularInline):
      model = Participant
      extra = 0
      fields = ( 'persons',)
      form = ParticipantInlineForm
  
      def has_delete_permission(self, request, obj=None):
          return False
  
      def has_add_permission(self, request, obj=None):
          return False
  </code></pre>
  
  <h2>Models</h2>
  
  <pre><code>class Person(models.Model):
          name = models.CharField(max_length=25, default='',  verbose_name='Nombre')
          lastname = models.CharField(max_length=25, default='',  verbose_name='Apellido')
          phone = models.CharField(max_length=30, default='',  verbose_name='Telefono')
          email = models.CharField(max_length=30, default='',  verbose_name='Email')
  
  
          def __str__(self):            
              return self.name + ' ' + self.lastname
  
          class Meta:
              verbose_name = "Persona"
              verbose_name_plural = "Personas"
  
  class Participant(models.Model):
          persons = models.ManyToManyField(Person)
          tournament = models.ForeignKey(Tournament, default='', verbose_name='Torneo')
          TEAM_NUMBER_CHOICES = (
              ('1', 'Equipo 1'),
              ('2', 'Equipo 2'),
              ('3', 'Equipo 3'),
              ('4', 'Equipo 4'),
              ('5', 'Equipo 5'),
              ('6', 'Equipo 6'),
              ('7', 'Equipo 7'),
              ('8', 'Equipo 8'),
              ('9', 'Equipo 9'),
          )
          team_number = models.CharField(max_length=2, verbose_name='Numero de Equipo', choices=TEAM_NUMBER_CHOICES, default='', blank=True)
          TEAM_FORMAT_CHOICES = (
              ('Singles 1', 'Singles 1'),
              ('Doubles 1', 'Doubles 1'),
              ('Singles 2', 'Singles 2'),
              ('Doubles 2', 'Doubles 2'),
              ('Singles 3', 'Singles 3'),
              ('Doubles 3', 'Doubles 3'),
              ('Singles 4', 'Singles 4'),
              ('Doubles 4', 'Doubles 4'),
              ('Singles 5', 'Singles 5'),
              ('Doubles 5', 'Doubles 5'),
              ('Singles 6', 'Singles 6'),
              ('Doubles 6', 'Doubles 6'),
          )
          team_format = models.CharField(max_length=9, verbose_name='Formato de Equipo', choices=TEAM_FORMAT_CHOICES, default='', blank=True)
  
          def __str__(self):
              string = ''
              if self.team_number and self.team_format:
                  string = 'Equipo ' + self.team_number + ' ' + self.team_format
              else:
                  for person in self.persons.all():
                      string = string + person.__str__() + ' '
              return string
  
  
          class Meta:
              verbose_name = "Participante"
              verbose_name_plural = "Participantes"
  </code></pre>
  
  <p>I changed the widget using this code, but the values are wrong.
  It's showing integers like <a href="http://i.stack.imgur.com/jxz1A.png" rel="nofollow">1L, 2L, 3L</a>. I think they might be the id's...</p>
  
  <p>I have also tried redefining the widget, but old ManyToManyField objects won't get there and I can't set the initial values, any help?</p>
  
  <p>I just want to show the string representation of each object in the ManyToManyField as a readonly field within the Inline.</p>
  
  <p>Thanks in advance!</p>