paginate(var_name,
default_order='',
default_reversed=None,
limit=10,
allow_limit_override=False,
max_pages=5,
dynamic_limit=None)
| source code
|
- Parameters:
var_name (string) - the variable name that the paginate decorator will try to
control. This key must be present in the dictionnary returned
from your controller in order for the paginate decorator to be
able to handle it.
default_order (string or a list of strings. Any string starting with
"-" (dash) indicates a reverse order for that
field/column.) - Needs work! XXX
default_reversed (Boolean [Deprecated]) - Needs work! XXX
limit (integer) - the hard coded limit that the paginate decorator will impose on
the number of "var_name" to display at the same time.
This value can be overridden by the use of the dynamic_limit
keyword argument
allow_limit_override (Boolean) - A boolean that indicates if the parameters passed in the calling
URL can modify the imposed limit. By default it is set to False.
If you want to be able to control the limit by using an URL
parameter then you need to set this to True.
max_pages (integer) - Needs work! XXX
dynamic_limit (string) - If specified, this parameter must be the name of a key present in
the dictionnary returned by your decorated controller. The value
found for this key will be used as the limit for our pagination
and will override the other settings, the hard-coded one declared
in the decorator itself AND the URL parameter one. This enables
the programmer to store a limit settings inside the application
preferences and then let the user manage it.
|