Fixed #8020 -- Fixed paginator initialisation in sitemaps framework. Thanks,

John D'Agostino.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8231 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2008-08-08 15:40:31 +00:00
parent 44e407b7c6
commit 90b6e1438f
1 changed files with 3 additions and 3 deletions

View File

@ -54,9 +54,9 @@ class Sitemap:
return obj.get_absolute_url()
def _get_paginator(self):
if not hasattr(self, "paginator"):
self.paginator = paginator.Paginator(self.items(), self.limit)
return self.paginator
if not hasattr(self, "_paginator"):
self._paginator = paginator.Paginator(self.items(), self.limit)
return self._paginator
paginator = property(_get_paginator)
def get_urls(self, page=1):