From d9f78d5344c26b3da7461e19b6f59806dc9d70cd Mon Sep 17 00:00:00 2001 From: Bartek Ciszkowski Date: Wed, 16 Jul 2014 12:08:24 -0400 Subject: [PATCH] Fixed reference to pk in RedirectView.get_redirect_url doc. --- docs/ref/class-based-views/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ref/class-based-views/base.txt b/docs/ref/class-based-views/base.txt index 0e43f5b4b3..e6c35fffd0 100644 --- a/docs/ref/class-based-views/base.txt +++ b/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)