Mercurial > p > roundup > code
comparison roundup/cgi/templating.py @ 5087:39af8a0f3446
Applied patch attached to issue2550723. Problem in index page
@pagesize=0 not properly propigated to previous batch link (is set to
actual number of entries displayed).
Using demo.py verified original issue with 0 page size. Also verified
that a non-zero page size was properly propigated (values 5 and 20).
Applied patch attached to issue. Verified issue with size 0
fixed. Verified that values 5 and 20 worked correctly. Updated
CHANGES.txt.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sat, 18 Jun 2016 23:49:41 -0400 |
| parents | c1f1465d5303 |
| children | 92d33d3125a0 |
comparison
equal
deleted
inserted
replaced
| 5086:2b551b6b0830 | 5087:39af8a0f3446 |
|---|---|
| 2923 | 2923 |
| 2924 # override these 'cos we don't have access to acquisition | 2924 # override these 'cos we don't have access to acquisition |
| 2925 def previous(self): | 2925 def previous(self): |
| 2926 if self.start == 1: | 2926 if self.start == 1: |
| 2927 return None | 2927 return None |
| 2928 return Batch(self.client, self._sequence, self._size, | 2928 return Batch(self.client, self._sequence, self.size, |
| 2929 self.first - self._size + self.overlap, 0, self.orphan, | 2929 self.first - self._size + self.overlap, 0, self.orphan, |
| 2930 self.overlap) | 2930 self.overlap) |
| 2931 | 2931 |
| 2932 def next(self): | 2932 def next(self): |
| 2933 try: | 2933 try: |
| 2934 self._sequence[self.end] | 2934 self._sequence[self.end] |
| 2935 except IndexError: | 2935 except IndexError: |
| 2936 return None | 2936 return None |
| 2937 return Batch(self.client, self._sequence, self._size, | 2937 return Batch(self.client, self._sequence, self.size, |
| 2938 self.end - self.overlap, 0, self.orphan, self.overlap) | 2938 self.end - self.overlap, 0, self.orphan, self.overlap) |
| 2939 | 2939 |
| 2940 class TemplatingUtils: | 2940 class TemplatingUtils: |
| 2941 """ Utilities for templating | 2941 """ Utilities for templating |
| 2942 """ | 2942 """ |
