title: Django: model object "has no attribute '_meta'" in class based view
body: <p>Hi Stackoverflow people, </p>
  
  <p>I am working with class based views and for a test site, I followed the <a href="https://docs.djangoproject.com/en/dev/topics/class-based-views/generic-editing/" rel="noreferrer">documentation</a> to setup the class based views.
  For a project site (based on the project model below), I just want to create a quick CRUD application for the simple project model below.</p>
  
  <p><strong>models.py</strong></p>
  
  <pre><code>class Project(models.Manager):
      name =  models.CharField(_('Name of the Project'), max_length = 100,)
      slug = models.SlugField(max_length=100,)
      ...
  </code></pre>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>from django.views.generic.edit import CreateView, UpdateView, DeleteView
  from django.core.urlresolvers import reverse_lazy
  from project.models import Project
  
  class ProjectCreate(CreateView):
      model = Project
  
  class ProjectUpdate(UpdateView):
      model = Project
  </code></pre>
  
  <p>When I now load <code>\project\add</code>, which should call the <code>ProjectCreate</code> class, I get the following error:
  <strong>type object 'Project' has no attribute '_meta'</strong></p>
  
  <p>I do not understand why. The model class normally does not require meta information. In other class based projects, I did not encounter this problem.</p>
  
  <p>Thank you for your suggestions!</p>
  
  <p><strong>Traceback</strong></p>
  
  <pre><code>Django Version: 1.4.1
  Python Version: 2.7.1
  
  Traceback:
  File "/Users/neurix/Development/vir_project_2.0/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
    111.                         response = callback(request, *callback_args, **callback_kwargs)
  File "/Users/neurix/Development/vir_project_2.0/lib/python2.7/site-packages/django/views/generic/base.py" in view
    48.             return self.dispatch(request, *args, **kwargs)
  File "/Users/neurix/Development/vir_project_2.0/lib/python2.7/site-packages/django/views/generic/base.py" in dispatch
    69.         return handler(request, *args, **kwargs)
  File "/Users/neurix/Development/vir_project_2.0/lib/python2.7/site-packages/django/views/generic/edit.py" in get
    168.         return super(BaseCreateView, self).get(request, *args, **kwargs)
  File "/Users/neurix/Development/vir_project_2.0/lib/python2.7/site-packages/django/views/generic/edit.py" in get
    130.         form_class = self.get_form_class()
  File "/Users/neurix/Development/vir_project_2.0/lib/python2.7/site-packages/django/views/generic/edit.py" in get_form_class
    89.             return model_forms.modelform_factory(model)
  File "/Users/neurix/Development/vir_project_2.0/lib/python2.7/site-packages/django/forms/models.py" in modelform_factory
    407.     return form_metaclass(class_name, (form,), form_class_attrs)
  File "/Users/neurix/Development/vir_project_2.0/lib/python2.7/site-packages/django/forms/models.py" in __new__
    206.                                       opts.exclude, opts.widgets, formfield_callback)
  File "/Users/neurix/Development/vir_project_2.0/lib/python2.7/site-packages/django/forms/models.py" in fields_for_model
    146.     opts = model._meta
  
  Exception Type: AttributeError at /project/add/
  Exception Value: type object 'Project' has no attribute '_meta'
  </code></pre>