title: Could not resolve URL for hyperlinked relationship
body: <p>I try to make API on django-rest-framework:</p>
  
  <p>models.py</p>
  
  <pre><code>class ArticleCategory(SystemModel):
      name =          models.CharField(blank=False, max_length=255)
      category_slug = models.SlugField(blank=True, null=False)
      def save(self, *args, **kwargs):
  
  class ArticleItem(SystemModel):
      name =              models.CharField(blank=False, max_length=255)
      item_slug =         models.SlugField(blank=True, null=False)
      text =              models.TextField(blank=True)
      article_category =  models.ForeignKey('article.ArticleCategory', blank=False, null=False, related_name='article_item_set')
  </code></pre>
  
  <p>serializers.py</p>
  
  <pre><code>class ArticleCategorySerializer(serializers.HyperlinkedModelSerializer):
      article_items = serializers.HyperlinkedIdentityField('article_item_set', view_name='article:item')
      class Meta:
          model =     ArticleCategory
          fields =    ('url', 'name', 'category_slug', 'article_items',)
  
  class ArticleItemSerializer(serializers.HyperlinkedModelSerializer):
      article_category = serializers.HyperlinkedIdentityField('article_category', view_name='article:category')
      class Meta:
          model =     ArticleItem
          fields =    ('url', 'name', 'item_slug', 'text', 'article_category')
  </code></pre>
  
  <p>urls.py</p>
  
  <pre><code>#namespace='article'
  urlpatterns = patterns('',
     url(r'^(?P&lt;category_slug&gt;[\w-]+)/(?P&lt;item_slug&gt;[\w-]+)', ArticleItemDetail.as_view(), name='item'),
     url(r'^(?P&lt;category_slug&gt;[\w-]+)', ArticleItemListByCategory.as_view(), name='category'),
     url(r'^', ArticleItemList.as_view(), name='item-list')
  )
  </code></pre>
  
  <p>and api.py</p>
  
  <pre><code>class ArticleItemDetail(generics.RetrieveUpdateDestroyAPIView):
      model = ArticleItem
      serializer_class = ArticleItemSerializer
      lookup_field = 'article_slug'
  
  class ArticleItemListByCategory(generics.ListAPIView):
      model = ArticleItem
      serializer_class = ArticleItemSerializer
      def get_queryset(self):
          queryset = super(ArticleItemListByCategory, self).get_queryset()
          return queryset.filter(article_category__category_slug=self.kwargs.get('category_slug'))
  </code></pre>
  
  <p>When i try to get item-list (<code>http://127.0.0.1:8000/article/</code>), i get error </p>
  
  <blockquote>
    <p>Exception at /article/</p>
    
    <p>Could not resolve URL for hyperlinked relationship using view name
    "articleitem-detail". You may have failed to include the related model
    in your API, or incorrectly configured the <code>lookup_field</code> attribute on
    this field.</p>
  </blockquote>
  
  <p>How to resolve this problem? I want to save this url-structure and in the same time have url-field for every objects:</p>
  
  <p>Article item</p>
  
  <pre><code>{
      "name": "Article item 1",
      "url": "http://127.0.0.1/article/article-category-1/article-item-1",
      "item_slug": "article-item-1",
      "text": "\u0432\u043e\u043b\u043e\u0432\u043b\u043e",
      "article_category": {
          "name": "Article category 1",
          "url": "http://127.0.0.1/article/article-category-1",
      }
  },
  </code></pre>
  
  <p>Article category</p>
  
  <pre><code>{
      "name": "Article category 1",
      "url": "http://127.0.0.1/article/article-category-1",
      "category_slug": "article-category-1",
      "text": "\u0432\u043e\u043b\u043e\u0432\u043b\u043e",
      "article_items": [
          {
              "name": "Article item 1",
              "url": "http://127.0.0.1/article/article-category-1/article-item-1",
          },
          {
              "name": "Article item 2",
              "url": "http://127.0.0.1/article/article-category-1/article-item-2",
          },
      ]
  },
  </code></pre>