My application stack includes AngularJs -> Django Rest Framework -> Django. I am designing a comments application for articles on my website. These articles are linked to a topic entity. Now for writing a REST backend for these comments I end up with urls that look like -
/topics/(topic_id)/articles/(article_id)/comments.
Thus my views in turn end up having signature like:
get(self, requests, topic_id, article_id, format=None)
The Comments do not need to have any information about topic to which this article is attached and yet it has that information. I am unable to figure out whether this is a bad REST design or if I can do it in some better way in django.
BTW I looked at generic implementation of comments application. It seems to be relying on template tags for information like article_id which I can not use since I am not using django templates.