title: Django Meta Class Access Outer Attribute
body: <p>Folks,</p>
  
  <p>I need to implement a form that may vary a little depending on a variable. My class that subclasses ModelForms looks like this</p>
  
  <pre><code>class ConstantVwModelForm(forms.ModelForm):
    #couple attributes
  
    def __init__(self, hasData, *args, **kwargs): 
  
    class Meta:
      fields = ('xx', 'yy' ..)
  </code></pre>
  
  <p>I am looking for the very best way to access the variable <code>hasData</code> from the inner <code>class Meta</code>, it would be like</p>
  
  <pre><code>class ConstantVwModelForm(forms.ModelForm):
    #couple attributes
  
    def __init__(self, hasData, *args, **kwargs): 
  
    class Meta:
      if hasData:
        fields = ('xx', 'yy', ..)
      else:
        fields = ('hh', ..)
  </code></pre>
  
  <p>Any help is highly appreciated</p>