  class BlogPostDetail(generics.RetrieveAPIView):
      model = BlogPost
  
  urlpatterns = patterns('',
      url(r'^basic/$', BasicList.as_view(), name='basicmodel-list'),
      url(r'^basic/(?P<pk>\d+)/$', BasicDetail.as_view(), name='basicmodel-detail'),
      url(r'^anchor/(?P<pk>\d+)/$', AnchorDetail.as_view(), name='anchor-detail'),
      url(r'^manytomany/$', ManyToManyList.as_view(), name='manytomanymodel-list'),
      url(r'^manytomany/(?P<pk>\d+)/$', ManyToManyDetail.as_view(), name='manytomanymodel-detail'),
 
</s> remove     url(r'^comments/$', BlogPostCommentListCreate.as_view(), name='blogpostcomment-list')
 </s> add     url(r'^comments/$', BlogPostCommentListCreate.as_view(), name='blogpostcomment-list'),
    url(r'^albums/(?P<title>\w[\w-]*)/$', AlbumDetail.as_view(), name='album-detail'),
    url(r'^photos/$', PhotoListCreate.as_view(), name='photo-list') </s> remove from rest_framework.tests.models import Anchor, BasicModel, ManyToManyModel, BlogPost, BlogPostComment
 </s> add from rest_framework.tests.models import Anchor, BasicModel, ManyToManyModel, BlogPost, BlogPostComment, Album, Photo
class PhotoListCreate(generics.ListCreateAPIView):
    model = Photo
    model_serializer_class = PhotoSerializer


class AlbumDetail(generics.RetrieveAPIView):
    model = Album


  class BlogPostDetail(generics.RetrieveAPIView):
      model = BlogPost
  
class PhotoListCreate(generics.ListCreateAPIView):
    model = Photo
    model_serializer_class = PhotoSerializer


class AlbumDetail(generics.RetrieveAPIView):
    model = Album


  urlpatterns = patterns('',
      url(r'^basic/$', BasicList.as_view(), name='basicmodel-list'),
      url(r'^basic/(?P<pk>\d+)/$', BasicDetail.as_view(), name='basicmodel-detail'),
      url(r'^anchor/(?P<pk>\d+)/$', AnchorDetail.as_view(), name='anchor-detail'),
      url(r'^manytomany/$', ManyToManyList.as_view(), name='manytomanymodel-list'),
      url(r'^manytomany/(?P<pk>\d+)/$', ManyToManyDetail.as_view(), name='manytomanymodel-detail'),
keep keep add keep keep keep keep keep keep
 added testcase for custom slug field in hyperlinkedrelatedfield 
rest_framework/tests/hyperlinkedserializers.py