mirror of https://github.com/django/django.git
[1.6.x] Fixed reference to pk in RedirectView.get_redirect_url doc.
Backport of d9f78d5344
from master
This commit is contained in:
parent
21853c1b90
commit
24e97add31
|
@ -192,7 +192,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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue