From 30a4cad2bfdf080037f1bff3754b0d3ad0c5bafd Mon Sep 17 00:00:00 2001 From: Bartek Ciszkowski Date: Wed, 16 Jul 2014 12:08:24 -0400 Subject: [PATCH] [1.7.x] Fixed reference to pk in RedirectView.get_redirect_url doc. Backport of d9f78d5344 from master --- 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 7b627d3d44..1c804a9518 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)