Browse files

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

Backport of d9f78d5 from master
  • Loading branch information...
1 parent de70900 commit 30a4cad2bfdf080037f1bff3754b0d3ad0c5bafd @bartek bartek committed with timgraham Jul 16, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 docs/ref/class-based-views/base.txt
View
2 docs/ref/class-based-views/base.txt
@@ -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)

0 comments on commit 30a4cad

Please sign in to comment.