Fixed reference to pk in RedirectView.get_redirect_url doc.

This commit is contained in:
Bartek Ciszkowski 2014-07-16 12:08:24 -04:00 committed by Tim Graham
parent 145d231782
commit d9f78d5344
1 changed files with 1 additions and 1 deletions

View File

@ -186,7 +186,7 @@ RedirectView
pattern_name = 'article-detail'
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()
return super(ArticleCounterRedirectView, self).get_redirect_url(*args, **kwargs)