title: fields and base_fields - Django
body: <p>When creating a flatpage, I want the user to select a template from a predefined list. In order to keep the <code>Flatpage</code> model untouched, I prefer <code>ChoiceField</code> over <code>ModelChoiceField</code> (the latter provides the PK of the template, but I need the name for the template_name field):</p>
  
  <pre><code>class NewFlatpageForm(FlatpageForm):
  
      template_name = forms.ChoiceField(choices = [])
      def __init__(self, *args, **kwargs):
          self.base_fields['template_name'].choices = ProjectTemplate.objects.values_list('path', 'name')
          super(NewFlatpageForm, self).__init__(*args, **kwargs)
  </code></pre>
  
  <p>I override <code>__init__</code> or Django populates choices at server start and does not update the list then. </p>
  
  <p>I don't have any admin experience, but I did similar things using the <code>fields</code> attribute when not using admin. However in this case, I got an exception telling <code>fields</code> is not an attribute of the form. <code>__dict__</code> showed me there's a <code>base_fields</code> attribute and using it works. So, why use base_fields here, and why is <code>fields</code> not present and finally am I doing something hacky?</p>