title: Class-based view "has no attribute .as_view()" error
body: <p>I'm following <a href="http://code.tutsplus.com/tutorials/beginners-guide-to-the-django-rest-framework--cms-19786" rel="noreferrer">this tutorial</a>, trying to make an API for my <code>Products</code> table.</p>
  
  <p>Here's my .views/API/apitest.py view:</p>
  
  <pre><code>from my_app.views.API.serializers import ProductSerializer
  from my_app.models import Product
  from rest_framework import generics
  
  class APITest(generics.ListAPIView):
      model=Product
      serializer_class=ProductSerializer
      queryset = Product.objects.all()
  </code></pre>
  
  <p>The urls.py entry:</p>
  
  <pre><code>url(r'^API/products/$', views.API.apitest.as_view(), name='apitest')
  </code></pre>
  
  <p>That line gives an error: <code>'module' object has no attribute 'as_view'</code>. I'm just trying to create a simple example for the moment, so there's no need for decorators. What causes this error? I'm using Django 1.9.2.</p>