[1.6.x] Fixed reference to pk in RedirectView.get_redirect_url doc.

Backport of d9f78d5344 from master
This commit is contained in:
Bartek Ciszkowski 2014-07-16 12:08:24 -04:00 committed by Tim Graham
parent 21853c1b90
commit 24e97add31
1 changed files with 1 additions and 1 deletions

View File

@ -192,7 +192,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)