comparison piecrust/data/paginator.py @ 886:dcdec4b951a1

admin: Get the admin panel working again.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 20 Jun 2017 21:13:08 -0700
parents 757fba54bfd3
children b9374b3682f0
comparison
equal deleted inserted replaced
885:13e8b50a2113 886:dcdec4b951a1
214 def _getPageUri(self, index): 214 def _getPageUri(self, index):
215 return self._page.getUri(index) 215 return self._page.getUri(index)
216 216
217 def _onIteration(self, it): 217 def _onIteration(self, it):
218 if not self._pgn_set_on_ctx: 218 if not self._pgn_set_on_ctx:
219 rcs = self._page.app.env.render_ctx_stack 219 rcs = self._source.app.env.render_ctx_stack
220 rcs.current_ctx.setPagination(self) 220 if rcs.current_ctx is not None:
221 self._pgn_set_on_ctx = True 221 rcs.current_ctx.setPagination(self)
222 222 self._pgn_set_on_ctx = True
223