Warning:
Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.
| File paginate.py.diff.1a,
1.2 KB
(added by sbr77, 6 years ago) |
|
patch to fix form data only (no SA or sorting changes)
|
| Line | |
|---|
| 1 | Index: paginate.py |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- paginate.py (revision 2052) |
|---|
| 4 | +++ paginate.py (working copy) |
|---|
| 5 | @@ -7,6 +7,7 @@ |
|---|
| 6 | import turbogears |
|---|
| 7 | from turbogears.decorator import weak_signature_decorator |
|---|
| 8 | from turbogears.view import variable_providers |
|---|
| 9 | +from formencode.variabledecode import variable_encode |
|---|
| 10 | |
|---|
| 11 | log = logging.getLogger("turbogears.paginate") |
|---|
| 12 | |
|---|
| 13 | @@ -65,10 +66,12 @@ |
|---|
| 14 | current_page=page, |
|---|
| 15 | max_pages=max_pages) |
|---|
| 16 | |
|---|
| 17 | - # which one should we use? cherrypy.request.input_values or kw? |
|---|
| 18 | - #input_values = cherrypy.request.input_values.copy() |
|---|
| 19 | - input_values = kw.copy() |
|---|
| 20 | + input_values = variable_encode(cherrypy.request.params.copy()) |
|---|
| 21 | input_values.pop('self', None) |
|---|
| 22 | + for input_key in input_values.keys(): |
|---|
| 23 | + if input_key.startswith('tg_paginate'): |
|---|
| 24 | + del input_values[input_key] |
|---|
| 25 | + |
|---|
| 26 | |
|---|
| 27 | cherrypy.request.paginate = Paginate(current_page=page, |
|---|
| 28 | limit=limit_, |
|---|
Download in other formats: