title: ModelForm has no model class specified.[django]
body: <p>In my <strong>forms</strong> i have:</p>
  <pre><code>from pydoc import locate
  
  from django import forms
  from django.conf import settings
  
  from django.contrib.auth.forms import UserCreationForm, UsernameField
  from django.core.validators import EmailValidator
  
  class SignUpForm(UserCreationForm):
      username = UsernameField(label=_(&quot;Username&quot;), widget=forms.TextInput(), )
      email = forms.EmailField(max_length=254, label=&quot;Email&quot;, widget=forms.EmailInput(), validators=[EmailValidator])
  
      class Meta:
          model = locate(settings.AUTH_USER_MODEL)   &lt;--- HERE
          fields = (&quot;username&quot;, &quot;email&quot;, &quot;password1&quot;, &quot;password2&quot;)
  </code></pre>
  <p>in <strong>user app</strong> in <strong>models</strong>:</p>
  <pre><code>class Profile(AbstractUser):
  
      def __str__(self):
          return self.username
  </code></pre>
  <p>In my <strong>project settings.py</strong> I set up</p>
  <pre><code>AUTH_USER_MODEL = 'user.Profile'
  </code></pre>
  <p>And it gives me</p>
  <pre><code>ValueError at /user/register 
  ModelForm has no model class specified.
  </code></pre>
  <p>When I change class Meta <strong>in</strong> my <strong>form</strong> to:</p>
  <pre><code>class Meta:
  
          model = Profile   &lt;--- HERE
  </code></pre>
  <p>Everything is OK. Why my <em>model = locate(settings.AUTH_USER_MODEL)</em> doesnt work?</p>