r13722 - MoreFieldsAndWidgets/archetypes.querywidget/trunk/archetypes/querywidget
"Hanno Schlichting" <[email protected]> Wed, 13 Jul 2011 14:18:49 +0000
| Newsgroups | gmane.comp.web.zope.plone.archetypes.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: hannosch
Date: Wed Jul 13 14:18:47 2011
New Revision: 13722
Modified:
MoreFieldsAndWidgets/archetypes.querywidget/trunk/archetypes/querywidget/field.py
Log:
Pass on batch and limit arguments
Modified: MoreFieldsAndWidgets/archetypes.querywidget/trunk/archetypes/querywidget/field.py
==============================================================================
--- MoreFieldsAndWidgets/archetypes.querywidget/trunk/archetypes/querywidget/field.py (original)
+++ MoreFieldsAndWidgets/archetypes.querywidget/trunk/archetypes/querywidget/field.py Wed Jul 13 14:18:47 2011
@@ -26,9 +26,11 @@
querybuilder = QueryBuilder(instance, getSite().REQUEST)
sort_order = 'reverse' if instance.getSort_reversed() else 'ascending'
- return querybuilder(query=value,
+ limit = kwargs.get('limit', instance.getLimit())
+ return querybuilder(query=value, batch=kwargs.get('batch', False),
+ b_start=kwargs.get('b_start', 0), b_size=kwargs.get('b_size', 30),
sort_on=instance.getSort_on(), sort_order=sort_order,
- limit=instance.getLimit())
+ limit=limit)
def getRaw(self, instance, **kwargs):
return ObjectField.get(self, instance, **kwargs) or ()
------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric
Ries, the creator of the Lean Startup Methodology on "Lean Startup
Secrets Revealed." This video shows you how to validate your ideas,
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev