title: Django Rest Framework Nested Urls
body: <p>The models are</p>
  
  <pre><code>class Article(models.Model):
      title = models.CharField(max_length=30)
  
  class Categories(models.Model):
      article = models.ForeignKey(Article)
      name = models.CharField(max_length=30)
  </code></pre>
  
  <p>There is a possibility of using drf-extensions, how it can be used.</p>
  
  <p>How to do setup to  have URLs like </p>
  
  <pre><code>/api/article/92285/categories
  </code></pre>
  
  <p>It should be able to serve responses for GET, POST, and PUT</p>
  
  <p>from following format</p>
  
  <pre><code>{
    "article_id": 92285,
    "views": 0,
    "downloads": 0,
    "shares": 0,
    "handle_url": "",
    "title": "Test dataset",
    "defined_type": "dataset",
    "status": "Drafts",
    "published_date": "",
    "description": "Test description",
    "total_size": 0,
    "owner": {
      "id": 13483,
      "full_name": "John  Carter"
    },
    "authors": [
      {
        "first_name": "John ",
        "last_name": "Carter",
        "id": 13483,
        "full_name": "John Carter"
      }
    ],
    "tags": [
  
    ],
    "categories": [
    {
      "id": 135,
      "name": "Technology"
    },
    ]
  
  
    "files": [
  
    ]
  }
  
  --
  </code></pre>