title: Cannot Import Name (model)
body: <p>I am getting the error message above, more specifically "ImportError at /ops_page/create" "cannot import name ops_page." Basically, I have an app titled "ops_page" and I cannot seem to get the newly created url, "/ops_page/create" which should contain a form corresponding to the model within "ops_page." I have looked at similar threads, and have tried deleting .pyc files in the ops_page app as well as the root directory, as well as deleting the sqlite db and re-syncing/migrating. Any idea what the issue might be here?</p>
  
  <p>My base urls.py:</p>
  
  <pre><code>urlpatterns = patterns('',
      .
      .
      url(r'^ops_page/', include('ops_page.urls')),
      .
      .
  )
  </code></pre>
  
  <p>My ops_page urls.py:</p>
  
  <pre><code>urlpatterns = patterns('',
      url(r'^create/$', 'ops_page.views.create'),
  )
  </code></pre>
  
  <p>My ops_page models.py:</p>
  
  <pre><code>from django.db import models
  from django.conf import settings
  import os.path
  
  
  
  class OpsPageInfo(models.Model):
          campaign_name = models.CharField(max_length=100, unique=True, blank=True)
          campaign_pic = models.ImageField(upload_to="images/opspage_pics")
          description_header = models.CharField(max_length=100, blank=True)
          campaign_description = models.CharField(max_length=600, blank=True)
          goal = models.CharField(max_length=100, blank=True)
          perk_header1 = models.CharField(max_length=100, blank=True)
          perk_description1 = models.CharField(max_length=600, blank=True)
  
  
          def __unicode__(self):
                  return self.campaign_name
  </code></pre>
  
  <p>My ops_page views.py:</p>
  
  <pre><code>from django.shortcuts import render_to_response
  from ops_page.models import OpsPageInfo
  from django.http import HttpResponse
  from forms import OpsPageForm
  from django.http import HttpResponseRedirect
  
  
  def create(request):
      if request.POST:
          form = OpsPageForm(request.POST)
          if form.is_valid():
              form.save()
  
  
              return HttpResponseRedirect('/artist_donation/')
  
      else:
          form = OpsPageForm()
  
      args = {}
      args.update(csrf(request))
  
      args['form'] = form
  
      return render_to_response('create_opspage.html', args)
  </code></pre>
  
  <p>My ops_page forms.py:</p>
  
  <pre><code>from django import forms
  from models import ops_page
  
  
  class OpsPageForm(forms.ModelForm):
  
      class Meta:
          model = ops_page
  </code></pre>
  
  <p>The create_opspage.html form:</p>
  
  <pre><code>            {% block content %}
              &lt;form action="/ops_page/create/" method="post"&gt;{% csrf_token %}
                  &lt;ul&gt;
                  {{ form.as_ul }}
                  &lt;/ul&gt;
  
                  &lt;input type="submit" name="submit" value="Create Ops Page"&gt;
              &lt;/form&gt;
              {% endblock %}
  </code></pre>
  
  <p>And lastly, the traceback for my error:</p>
  
  <pre><code>Environment:
  
  
  Request Method: GET
  Request URL: http://127.0.0.1:8000/ops_page/create
  
  Django Version: 1.7.5
  Python Version: 2.7.5
  Installed Applications:
  ('django.contrib.admin',
   'django.contrib.auth',
   'django.contrib.contenttypes',
   'django.contrib.sessions',
   'django.contrib.messages',
   'django.contrib.staticfiles',
   'django.contrib.humanize',
   'band',
   'friend',
   'registration',
   'music',
   'audiofield',
   'user_profile',
   'social.apps.django_app.default',
   'directory',
   'youtube_urls',
   'ops_page')
  Installed Middleware:
  ('django.contrib.sessions.middleware.SessionMiddleware',
   'django.middleware.common.CommonMiddleware',
   'django.middleware.csrf.CsrfViewMiddleware',
   'django.contrib.auth.middleware.AuthenticationMiddleware',
   'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
   'django.contrib.messages.middleware.MessageMiddleware',
   'django.middleware.clickjacking.XFrameOptionsMiddleware',
   'audiofield.middleware.threadlocals.ThreadLocals')
  
  
  Traceback:
  File "/Library/Python/2.7/site-packages/Django-1.7.5-py2.7.egg/django/core/handlers/base.py" in get_response
    87.                 response = middleware_method(request)
  File "/Library/Python/2.7/site-packages/Django-1.7.5-py2.7.egg/django/middleware/common.py" in process_request
    73.                     urlresolvers.is_valid_path("%s/" % request.path_info, urlconf)):
  File "/Library/Python/2.7/site-packages/Django-1.7.5-py2.7.egg/django/core/urlresolvers.py" in is_valid_path
    619.         resolve(path, urlconf)
  File "/Library/Python/2.7/site-packages/Django-1.7.5-py2.7.egg/django/core/urlresolvers.py" in resolve
    494.     return get_resolver(urlconf).resolve(path)
  File "/Library/Python/2.7/site-packages/Django-1.7.5-py2.7.egg/django/core/urlresolvers.py" in resolve
    345.                     sub_match = pattern.resolve(new_path)
  File "/Library/Python/2.7/site-packages/Django-1.7.5-py2.7.egg/django/core/urlresolvers.py" in resolve
    345.                     sub_match = pattern.resolve(new_path)
  File "/Library/Python/2.7/site-packages/Django-1.7.5-py2.7.egg/django/core/urlresolvers.py" in resolve
    224.             return ResolverMatch(self.callback, args, kwargs, self.name)
  File "/Library/Python/2.7/site-packages/Django-1.7.5-py2.7.egg/django/core/urlresolvers.py" in callback
    231.         self._callback = get_callable(self._callback_str)
  File "/Library/Python/2.7/site-packages/Django-1.7.5-py2.7.egg/django/utils/lru_cache.py" in wrapper
    101.                     result = user_function(*args, **kwds)
  File "/Library/Python/2.7/site-packages/Django-1.7.5-py2.7.egg/django/core/urlresolvers.py" in get_callable
    97.             mod = import_module(mod_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py" in import_module
    37.     __import__(name)
  File "/Users/sethjones/Desktop/atmos_v6/ops_page/views.py" in &lt;module&gt;
    4. from forms import OpsPageForm
  File "/Users/sethjones/Desktop/atmos_v6/ops_page/forms.py" in &lt;module&gt;
    2. from models import ops_page
  
  Exception Type: ImportError at /ops_page/create
  Exception Value: cannot import name ops_page
  </code></pre>
  
  <p>I am relatively new to django, so it could be an error in my syntax or I didn't map things correctly. Any help would be greatly appreciated. Thank you. </p>