I have this routing:
url(r'^article/(?P<article_id>\d+)/', views.ArticleList.as_view())
which leads to this function:
class RSSList(APIView):
def get(self, request, *args, **kwargs):
article_id = kwargs.get('article_id')
But when I try to query something like /article/34
I get this error:
TypeError: get() got an unexpected keyword argument 'article_id'
How can I pass article_id to get()?
Thank you
RSSList
is not the problem, you are missing*args, **kwargs
somewhere else. Maybe inArticleList
instead ofRSSList
? – HaywireArticleList
class in your routing! But you're fetchingarticle_id
inside ofRSSList
class instead! – Sauterne