title: ImportError at articles/api/article: Cannot import name ArticleResource
body: <p>I'm trying to create a Django website and every time I run the /articles/api/article page on my local host: I get this traceback: </p>
  
  <pre><code>Environment:
  
  
  Request Method: GET
  Request URL: http://127.0.0.1:8000/articles/api/article
  
  Django Version: 1.7.4
  Python Version: 2.7.8
  Installed Applications:
  ('django.contrib.admin',
   'django.contrib.auth',
   'django.contrib.contenttypes',
   'django.contrib.sessions',
   'django.contrib.sites',
   'django.contrib.messages',
   'django.contrib.staticfiles',
   'django.contrib.comments',
   'article',
   'tastypie')
  
  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')
  
  
  Traceback:
  File "/home/deanna/django-deanna/local/lib/python2.7/site-packages/Django-1.7.4-py2.7.egg/django/core/handlers/base.py" in get_response
    87.                 response = middleware_method(request)
  File "/home/deanna/django-deanna/local/lib/python2.7/site-packages/Django-1.7.4-py2.7.egg/django/middleware/common.py" in process_request
    72.             if (not urlresolvers.is_valid_path(request.path_info, urlconf) and
  File "/home/deanna/django-deanna/local/lib/python2.7/site-packages/Django-1.7.4-py2.7.egg/django/core/urlresolvers.py" in is_valid_path
    619.         resolve(path, urlconf)
  File "/home/deanna/django-deanna/local/lib/python2.7/site-packages/Django-1.7.4-py2.7.egg/django/core/urlresolvers.py" in resolve
    494.     return get_resolver(urlconf).resolve(path)
  File "/home/deanna/django-deanna/local/lib/python2.7/site-packages/Django-1.7.4-py2.7.egg/django/core/urlresolvers.py" in resolve
    343.             for pattern in self.url_patterns:
  File "/home/deanna/django-deanna/local/lib/python2.7/site-packages/Django-1.7.4-py2.7.egg/django/core/urlresolvers.py" in url_patterns
    372.         patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/home/deanna/django-deanna/local/lib/python2.7/site-packages/Django-1.7.4-py2.7.egg/django/core/urlresolvers.py" in urlconf_module
    366.             self._urlconf_module = import_module(self.urlconf_name)
  File "/usr/lib/python2.7/importlib/__init__.py" in import_module
    37.     __import__(name)
  File "/home/deanna/django_test/django_test/urls.py" in &lt;module&gt;
    3. from tastypie.api import ArticleResource
  
  Exception Type: ImportError at /articles/api/article
  Exception Value: cannot import name ArticleResource
  </code></pre>
  
  <p>This my urls.py file, which is located under the django_test/django_test directory: </p>
  
  <pre><code>from django.conf.urls import patterns, include, url
  from django.contrib import admin
  from tastypie.api import ArticleResource
  
  article_resource = ArticleResource()
  
  urlpatterns = patterns('',
                     url(r'^admin/', include(admin.site.urls)),
                     url(r'^accounts/login/$', 'django_test.views.login'),
                     url(r'^accounts/auth/$', 'django_test.views.auth_view'),
                     url(r'^accounts/loggedin/$', 'django_test.views.loggedin'),
                     url(r'^accounts/invalid/$', 'django_test.views.invalid_login'),
                     url(r'^accounts/logout/$', 'django_test.views.logout'),
                     url(r'^accounts/register/$', 'django_test.views.register_user'),
                     url(r'^accounts/register_success/$', 'django_test.views.register_success'),
                     url(r'^articles/all/$', 'article.views.articles'),
                     url(r'^articles/create/$', 'article.views.create'),
                     url(r'^articles/get/(?P&lt;article_id&gt;\d+)/$', 'article.views.article'),
                     url(r'^articles/like/(?P&lt;article_id&gt;\d+)/$', 'article.views.like_article'),
                     url(r'^articles/add_comment/(?P&lt;article_id&gt;\d+)/$', 'article.views.add_comment'),
                     url(r'^articles/search/', 'article.views.search_titles'),
                     url(r'^articles/api/article', include(article_resource.urls)),
  
  ) 
  </code></pre>
  
  <p>This is my api.py file, which is also located in the django_test/django_test directory: </p>
  
  <pre><code>from tastypie.resources import ModelResource
  from tastypie.constants import ALL
  from models import Article 
  
  class ArticleResource(ModelResource):
      class Meta:
          queryset = Article.objects.all()
          resource_name = 'article'
  </code></pre>
  
  <p>I tried separating the third import statement in the api.py file and putting it in a separate file but I still got the same error, so that's not the problem. I synced the db and did all the needed migrations but I still ran into the same error. The TastyPie version I am using is 0.12.1. </p>
  
  <p>I'd appreciate any help I can get, as I have been stuck on this error for literally days now. Thank you.</p>
  
  <p>Edit: I made some changes and now I have a "page not found at /articles/api/article" message even though I have that in my urls.py file. Here is the traceback: </p>
  
  <pre><code>Using the URLconf defined in django_test.urls, Django tried these URL patterns, in this order:
  
  1. ^admin/
  2. ^accounts/login/$
  3. ^accounts/auth/$
  4. ^accounts/loggedin/$
  5. ^accounts/invalid/$
  6. ^accounts/logout/$
  7. ^accounts/register/$
  8. ^accounts/register_success/$
  9. ^articles/all/$
  10. ^articles/create/$
  11. ^articles/get/(?P&lt;article_id&gt;\d+)/$
  12. ^articles/like/(?P&lt;article_id&gt;\d+)/$
  13. ^articles/add_comment/(?P&lt;article_id&gt;\d+)/$
  14. ^articles/search/
  15. ^articles/api/article ^(?P&lt;resource_name&gt;article)/$ [name='api_dispatch_list']
  16. ^articles/api/article ^(?P&lt;resource_name&gt;article)/schema/$ [name='api_get_schema']
  17. ^articles/api/article ^(?P&lt;resource_name&gt;article)/set/(?P&lt;pk_list&gt;.*?)/$ [name='api_get_multiple']
  18. ^articles/api/article ^(?P&lt;resource_name&gt;article)/(?P&lt;pk&gt;.*?)/$ [name='api_dispatch_detail']
  
  The current URL, articles/api/article, didn't match any of these.
  </code></pre>
  
  <p>Numbers 15-18 on this traceback weren't the exact statements I wrote in my urls.py file though, so I'm confused. </p>