\n\nFor the navigation you add the following snippet to your template::\n\n
\n\nFor backwards compatibility *plone.batching* provides a drop in metal macro *navigation* in the *batch_macros* template.\nAdd it to the template like this::\n\n
\n\n\nUsage in Python code\n--------------------\n\nA batch is instantiated like this::\n\n >>> from plone.batching import Batch\n >>> batch = Batch(range(100), size=15, orphan=10)\n\nThis generates 5 subbatches with 15 items from the sequence [0, 1, ..., 99] and one subbatch with the last 25 items (including 10 orphaned items).\nFor a detailed description of available parameters for a batch look at the API of the BaseBatch class.\n\nAnother way to instaniate a batch is like this::\n\n >>> batch = Batch.fromPagenumber(range(100), pagesize=15, pagenumber=1)\n\nThis results in 6 batches with 15 items and one batch with the last 10 items.\nThis way of creating a batch is meant as a short cut and does not support all the options the canonical constructor supports.\n\nFor big sequences there is another base class provided by the package: *QuantumBatch*.\nThis batch generates quantum leaps for quicker navigation.\n\n::\n\n >>> from plone.batching.batch import QuantumBatch\n >>> qb = QuantumBatch(range(1000), 10, start=500, quantumleap=1)\n >>> qb.leapforward\n [69, 84]\n >>> qb.leapback\n [18, 33]\n\nIt is possible to navigate the batch stored in the two attributes *leapback* and *leapforward* with 5 clicks.\n\nUsage in Views\n--------------\n\nPlone.batching comes with a customizable batch View *batchnavigation* with the view class *BatchView*.\nThe view comes with a template.\nAll you have to do, if you want to customize it, is to override the make_link-method.\nThis method should return a string with the link to the given *pagenumber*.\nHere is an example from the folder_contents implementation in plone.app.content::\n\n >>> from plone.batching.browser import BatchView\n >>> from ZTUtils import make_query\n\n >>> class MyBatchView(BatchView):\n ... def make_link(self, pagenumber):\n ... batchlinkparams = self.request.form.copy()\n ... return '%s?%s' % (self.request.ACTUAL_URL,\n ... make_query(batchlinkparams, {'pagenumber': pagenumber}))\n\nOne thing you have to keep in mind is to call the batch view with a batch as the first argument.\n\n::\n\n >>> from Products.Five import BrowserView\n >>> class MyContentView(BrowserView):\n ... def batch(self):\n ... \" \" # see above how a batch is defined\n ...\n ... def batching(self):\n ... return MyBatchView(self.context, self.request)(self.batch)\n\nNow you can use this in the template of your view.\n\n::\n\n
\n\nIncompatibilities\n-----------------\n\nXXX __len__ method\n\n\n\n",
"description_content_type": "",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://pypi.org/project/plone.batching",
"keywords": "Plone",
"license": "GPL",
"maintainer": "",
"maintainer_email": "",
"name": "plone.batching",
"package_url": "https://pypi.org/project/plone.batching/",
"platform": "",
"project_url": "https://pypi.org/project/plone.batching/",
"project_urls": {
"Homepage": "https://pypi.org/project/plone.batching"
},
"release_url": "https://pypi.org/project/plone.batching/1.1.5/",
"requires_dist": [
"setuptools",
"Zope2"
],
"requires_python": "",
"summary": "Batching facilities used in Plone.",
"version": "1.1.5"
},
"last_serial": 4545251,
"releases": {
"1.0": [
{
"comment_text": "",
"digests": {
"md5": "cabd58ccfec67cd384602343ce40dc7b",
"sha256": "f55579142fdfe61299360908f82e6c3efb3fc52d66a736fa8d17975e30571a22"
},
"downloads": -1,
"filename": "plone.batching-1.0.zip",
"has_sig": false,
"md5_digest": "cabd58ccfec67cd384602343ce40dc7b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 22756,
"upload_time": "2013-05-24T01:54:01",
"url": "https://files.pythonhosted.org/packages/00/2f/3cbe9a64a19e5f13b51dea0c4d87e864d9f320aade736611433eb84a971f/plone.batching-1.0.zip"
}
],
"1.0.1": [
{
"comment_text": "",
"digests": {
"md5": "4b57b660082683ad66910b3c6725c141",
"sha256": "8a3cb45c3352932179d4a11b9ecf5baa4e77642f8d790f392475600231e29206"
},
"downloads": -1,
"filename": "plone.batching-1.0.1.zip",
"has_sig": false,
"md5_digest": "4b57b660082683ad66910b3c6725c141",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 23166,
"upload_time": "2014-01-28T01:24:46",
"url": "https://files.pythonhosted.org/packages/42/62/a8d72d8b22ebeff4ef470fdb4ad75804d164a47134454d70bf9798b5dba0/plone.batching-1.0.1.zip"
}
],
"1.0.2": [
{
"comment_text": "",
"digests": {
"md5": "227181d31b5b38e173f47857da7f4303",
"sha256": "dea416c9ad6baac3c796a3e47552a9e2e01c2b88b14e7436dbcd72502ff39190"
},
"downloads": -1,
"filename": "plone.batching-1.0.2.zip",
"has_sig": false,
"md5_digest": "227181d31b5b38e173f47857da7f4303",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20638,
"upload_time": "2014-04-14T01:32:56",
"url": "https://files.pythonhosted.org/packages/6e/72/aa35b939e48fcec248a54ed2bec0bf8da728f4ffb6848c9889c0cca2af16/plone.batching-1.0.2.zip"
}
],
"1.0.3": [
{
"comment_text": "",
"digests": {
"md5": "fc660c9ebef8c0d6ba7381e979ac1209",
"sha256": "63d31eaf69474292a3268576b1fc02e721f2f5fac105a092ff1149e079a94e58"
},
"downloads": -1,
"filename": "plone.batching-1.0.3.zip",
"has_sig": false,
"md5_digest": "fc660c9ebef8c0d6ba7381e979ac1209",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 26530,
"upload_time": "2015-02-20T12:09:49",
"url": "https://files.pythonhosted.org/packages/f4/1a/f6f23e60b787a2d16627494a360f8b3290d2220ea4ff6e8b6c57a74508df/plone.batching-1.0.3.zip"
}
],
"1.0.4": [
{
"comment_text": "",
"digests": {
"md5": "562c51961bd59503d1a89dd306db235f",
"sha256": "9333acf197ef76b43be89ec125e27e781556751b6b73a8f267544142deb1fafc"
},
"downloads": -1,
"filename": "plone.batching-1.0.4.tar.gz",
"has_sig": false,
"md5_digest": "562c51961bd59503d1a89dd306db235f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 15159,
"upload_time": "2015-04-28T12:39:34",
"url": "https://files.pythonhosted.org/packages/9a/17/b65430ac2cdf51df1fbe6d040089c32b401f931c7fc3289146bb47a01bd3/plone.batching-1.0.4.tar.gz"
}
],
"1.0.5": [
{
"comment_text": "",
"digests": {
"md5": "9f1c4c6e49f073dcea0f6b8885a864f2",
"sha256": "719277a672ae02bd049f444373dfe14cccfe77722d3a36462f6e24676e304c39"
},
"downloads": -1,
"filename": "plone.batching-1.0.5.tar.gz",
"has_sig": false,
"md5_digest": "9f1c4c6e49f073dcea0f6b8885a864f2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 15430,
"upload_time": "2015-07-16T15:24:23",
"url": "https://files.pythonhosted.org/packages/2e/cf/a44fc6cf31f46ca4035e06695937d93ba1327450f24bc83957ede754c3b5/plone.batching-1.0.5.tar.gz"
}
],
"1.0.6": [
{
"comment_text": "",
"digests": {
"md5": "8be089023edd86643334c011f0f7717f",
"sha256": "69bce4fc54e10facde1245b7713a99101e2ef430f9b2c28a72dae7d82d2e2a61"
},
"downloads": -1,
"filename": "plone.batching-1.0.6.tar.gz",
"has_sig": false,
"md5_digest": "8be089023edd86643334c011f0f7717f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 16719,
"upload_time": "2016-01-08T11:32:10",
"url": "https://files.pythonhosted.org/packages/f2/91/9c0577ab09a4fbf9dfa43c1cf4087ccaa306493f352eaf1e5e336397e170/plone.batching-1.0.6.tar.gz"
}
],
"1.0.7": [
{
"comment_text": "",
"digests": {
"md5": "8febff98038536fb33baa8321ddc2a41",
"sha256": "7aab139243a604d3466b3bce275176f80bd77802c749d9b706ef08aa446f0fc3"
},
"downloads": -1,
"filename": "plone.batching-1.0.7.tar.gz",
"has_sig": false,
"md5_digest": "8febff98038536fb33baa8321ddc2a41",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 16818,
"upload_time": "2016-01-08T15:20:07",
"url": "https://files.pythonhosted.org/packages/7e/80/f6a134b8c2b02cab5e443dbbcb96f5ee875cc46a34181b208c73975f7b54/plone.batching-1.0.7.tar.gz"
}
],
"1.0.8": [
{
"comment_text": "",
"digests": {
"md5": "70dd9b6cae06c64967e7a2e84bb4383f",
"sha256": "d6c8b3b4a790a6b7bc894fc3d6a6f1985b5a1b1ef17185a264f219490428d071"
},
"downloads": -1,
"filename": "plone.batching-1.0.8.tar.gz",
"has_sig": false,
"md5_digest": "70dd9b6cae06c64967e7a2e84bb4383f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 17221,
"upload_time": "2016-02-15T08:11:39",
"url": "https://files.pythonhosted.org/packages/e3/49/564da5f7b3cc2ab29c9cc9a243cc47a27a05e4ca72b96b4e06423814935d/plone.batching-1.0.8.tar.gz"
}
],
"1.0a1": [
{
"comment_text": "",
"digests": {
"md5": "79628574dad4c300157e44ed4584427d",
"sha256": "fa619441182f0bfe3bbcd6ad38dc72b1ce2eab9674c60178a96de87815ab9b06"
},
"downloads": -1,
"filename": "plone.batching-1.0a1.zip",
"has_sig": false,
"md5_digest": "79628574dad4c300157e44ed4584427d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 18672,
"upload_time": "2012-04-25T15:24:53",
"url": "https://files.pythonhosted.org/packages/71/31/0f8504cac11ef36a679dee33fa54efdc51447284ca9fd01fb9d6290bbddd/plone.batching-1.0a1.zip"
}
],
"1.0b1": [
{
"comment_text": "",
"digests": {
"md5": "813a7d2d89fedf4f8e90e0c8da949c48",
"sha256": "2b97ff172b4b5cd2419cf4efd9376189f7423ecad113b9b913d9aabd5b44bfb7"
},
"downloads": -1,
"filename": "plone.batching-1.0b1.zip",
"has_sig": false,
"md5_digest": "813a7d2d89fedf4f8e90e0c8da949c48",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 22506,
"upload_time": "2013-01-18T03:01:32",
"url": "https://files.pythonhosted.org/packages/a0/43/269a89afc359e5ed13855bca7e8cfef157ac090bbac09b2497f34e4198e9/plone.batching-1.0b1.zip"
}
],
"1.1.0": [
{
"comment_text": "",
"digests": {
"md5": "29128ee69a3cf59e6dcb65ed2f02b012",
"sha256": "ce6e3f78c2c8939dc92078251489c5991d7d2d5c6f9df9a14732bdeb242b8be8"
},
"downloads": -1,
"filename": "plone.batching-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "29128ee69a3cf59e6dcb65ed2f02b012",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 17620,
"upload_time": "2016-02-12T14:23:42",
"url": "https://files.pythonhosted.org/packages/95/a0/09cb7fedf7331210afa1fad2ecd75bff098d51361c94c924454f62f282c3/plone.batching-1.1.0.tar.gz"
}
],
"1.1.1": [
{
"comment_text": "",
"digests": {
"md5": "b9fc50fa7cb79bb0b70b2be7b1f610e5",
"sha256": "ee157d8be8483d14ff9d30759928da834d0dd4c6aaa256e533de9b3368635d49"
},
"downloads": -1,
"filename": "plone.batching-1.1.1.tar.gz",
"has_sig": false,
"md5_digest": "b9fc50fa7cb79bb0b70b2be7b1f610e5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 17635,
"upload_time": "2016-08-12T16:47:54",
"url": "https://files.pythonhosted.org/packages/1e/ac/81920c71421b206ae386340c7c444e2e2485373314a20a4123af5febb101/plone.batching-1.1.1.tar.gz"
}
],
"1.1.2": [
{
"comment_text": "",
"digests": {
"md5": "decce560010f34512f783cba18d6fc02",
"sha256": "81b701d0fa0a356f696fddbfbce7524f6ade1e8e76fc81b44146a3bd5cb7144e"
},
"downloads": -1,
"filename": "plone.batching-1.1.2.tar.gz",
"has_sig": false,
"md5_digest": "decce560010f34512f783cba18d6fc02",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 17713,
"upload_time": "2017-07-20T18:49:52",
"url": "https://files.pythonhosted.org/packages/83/2a/c8bd3262d2ec61327cb74d4a593dac290d44dd70eb07a64d89e09ca01f38/plone.batching-1.1.2.tar.gz"
}
],
"1.1.3": [
{
"comment_text": "",
"digests": {
"md5": "d4059f3476688b7c4fd9aa490801fa80",
"sha256": "dab5278282fe7cf91e838b982f96bf1e5c06c46cf8ded3d81cc913f4f573b51b"
},
"downloads": -1,
"filename": "plone.batching-1.1.3-py2-none-any.whl",
"has_sig": false,
"md5_digest": "d4059f3476688b7c4fd9aa490801fa80",
"packagetype": "bdist_wheel",
"python_version": "py2",
"requires_python": null,
"size": 16982,
"upload_time": "2018-06-04T14:00:00",
"url": "https://files.pythonhosted.org/packages/57/d4/308203eef624a145b6844011094b43aa75736f51b74585123457f02249a7/plone.batching-1.1.3-py2-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "3584cace8cc9a5495669854860188fde",
"sha256": "1474766f76d42be5e16ae836dfa5f02edaa37868ae1938e32a788840e34acfd8"
},
"downloads": -1,
"filename": "plone.batching-1.1.3.tar.gz",
"has_sig": false,
"md5_digest": "3584cace8cc9a5495669854860188fde",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 18757,
"upload_time": "2018-06-04T14:00:02",
"url": "https://files.pythonhosted.org/packages/7e/55/1e9dcfc079387205ca1078173c26f7830c65244eab7a507d3e33b83573b6/plone.batching-1.1.3.tar.gz"
}
],
"1.1.4": [
{
"comment_text": "",
"digests": {
"md5": "67a0d4b31e94f3c2aca0be7c763c179f",
"sha256": "66be14575e01980fdba597c34203a229d7decf38602fdf7c514827f69b7656b2"
},
"downloads": -1,
"filename": "plone.batching-1.1.4-py2-none-any.whl",
"has_sig": false,
"md5_digest": "67a0d4b31e94f3c2aca0be7c763c179f",
"packagetype": "bdist_wheel",
"python_version": "py2",
"requires_python": null,
"size": 17349,
"upload_time": "2018-09-27T19:02:58",
"url": "https://files.pythonhosted.org/packages/f6/35/5cf4657f4027f173541a64e5cdb527758589d44853d1e317ec0ff27d799c/plone.batching-1.1.4-py2-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "a1e8ec09098fe4ea4743d2925f74ec23",
"sha256": "0a6ee3e939f8e546d75e6dbe1640b8598e158ca1a7ff3a703a058056d92b601c"
},
"downloads": -1,
"filename": "plone.batching-1.1.4.tar.gz",
"has_sig": false,
"md5_digest": "a1e8ec09098fe4ea4743d2925f74ec23",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 16246,
"upload_time": "2018-09-27T19:02:59",
"url": "https://files.pythonhosted.org/packages/ae/c5/f801ecd6baacc5544573c25238db9532145617c2ef663cc6e35c67795838/plone.batching-1.1.4.tar.gz"
}
],
"1.1.5": [
{
"comment_text": "",
"digests": {
"md5": "10bc1a420fe75b3d9693bfcf4d7f1b0e",
"sha256": "ee512233005f72f0f86d76149951d411bcca84465658c88491440862c6be88e8"
},
"downloads": -1,
"filename": "plone.batching-1.1.5-py2-none-any.whl",
"has_sig": false,
"md5_digest": "10bc1a420fe75b3d9693bfcf4d7f1b0e",
"packagetype": "bdist_wheel",
"python_version": "py2",
"requires_python": null,
"size": 17609,
"upload_time": "2018-11-30T02:09:00",
"url": "https://files.pythonhosted.org/packages/b8/d9/d71d85e0cbc0e55107e6a9f19e500fdbd5782dc0944fb3c80af12fbf5101/plone.batching-1.1.5-py2-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "6ffece06945aa29a269f47f76f2541e8",
"sha256": "b621b0b3a4c9b74e1b1d23907a36e2122893c8cde944300a073a9d807f3afa5c"
},
"downloads": -1,
"filename": "plone.batching-1.1.5.tar.gz",
"has_sig": false,
"md5_digest": "6ffece06945aa29a269f47f76f2541e8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 19709,
"upload_time": "2018-11-30T02:09:01",
"url": "https://files.pythonhosted.org/packages/55/35/dacf61dcd3bd732c4b16aa738364ff223757ed8c09c020b5f695c36888bb/plone.batching-1.1.5.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "10bc1a420fe75b3d9693bfcf4d7f1b0e",
"sha256": "ee512233005f72f0f86d76149951d411bcca84465658c88491440862c6be88e8"
},
"downloads": -1,
"filename": "plone.batching-1.1.5-py2-none-any.whl",
"has_sig": false,
"md5_digest": "10bc1a420fe75b3d9693bfcf4d7f1b0e",
"packagetype": "bdist_wheel",
"python_version": "py2",
"requires_python": null,
"size": 17609,
"upload_time": "2018-11-30T02:09:00",
"url": "https://files.pythonhosted.org/packages/b8/d9/d71d85e0cbc0e55107e6a9f19e500fdbd5782dc0944fb3c80af12fbf5101/plone.batching-1.1.5-py2-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "6ffece06945aa29a269f47f76f2541e8",
"sha256": "b621b0b3a4c9b74e1b1d23907a36e2122893c8cde944300a073a9d807f3afa5c"
},
"downloads": -1,
"filename": "plone.batching-1.1.5.tar.gz",
"has_sig": false,
"md5_digest": "6ffece06945aa29a269f47f76f2541e8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 19709,
"upload_time": "2018-11-30T02:09:01",
"url": "https://files.pythonhosted.org/packages/55/35/dacf61dcd3bd732c4b16aa738364ff223757ed8c09c020b5f695c36888bb/plone.batching-1.1.5.tar.gz"
}
]
}