Fixed reference to pk in RedirectView.get_redirect_url doc.
This commit is contained in:
parent
145d231782
commit
d9f78d5344
|
@ -186,7 +186,7 @@ RedirectView
|
||||||
pattern_name = 'article-detail'
|
pattern_name = 'article-detail'
|
||||||
|
|
||||||
def get_redirect_url(self, *args, **kwargs):
|
def get_redirect_url(self, *args, **kwargs):
|
||||||
article = get_object_or_404(Article, pk=pk)
|
article = get_object_or_404(Article, pk=kwargs['pk'])
|
||||||
article.update_counter()
|
article.update_counter()
|
||||||
return super(ArticleCounterRedirectView, self).get_redirect_url(*args, **kwargs)
|
return super(ArticleCounterRedirectView, self).get_redirect_url(*args, **kwargs)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue