.. image:: https://img.shields.io/pypi/v/collective.formsupport.counter.svg
:target: https://pypi.python.org/pypi/collective.formsupport.counter/
:alt: Latest Version
.. image:: https://img.shields.io/pypi/status/collective.formsupport.counter.svg
:target: https://pypi.python.org/pypi/collective.formsupport.counter
:alt: Egg Status
.. image:: https://img.shields.io/pypi/pyversions/collective.formsupport.counter.svg?style=plastic
:target: https://pypi.python.org/pypi/collective.formsupport.counter/
:alt: Supported - Python Versions
.. image:: https://img.shields.io/pypi/l/collective.formsupport.counter.svg
:target: https://pypi.python.org/pypi/collective.formsupport.counter/
:alt: License
.. image:: https://coveralls.io/repos/github/collective/collective.formsupport.counter/badge.svg
:target: https://coveralls.io/github/collective/collective.formsupport.counter
:alt: Coverage
==============================
collective.formsupport.counter
==============================
Counter integration for `collective.volto.formsupport <https://github.com/collective/collective.volto.formsupport>`_
Features
--------
- Form counter for `collective.volto.formsupport <https://github.com/collective/collective.volto.formsupport>`_ >= 3.2
Installation
------------
Install collective.formsupport.counter by adding it to your buildout::
[buildout]
...
eggs =
collective.formsupport.counter
and then running ``bin/buildout``
REST API
========
-------------------------------------------
🔄 Reset Form Counter
-------------------------------------------
Reset the counter for a specific form block.
**Endpoint:**
.. code-block:: text
/<document>/@counter
**Method:**
``PATCH``
**Parameters:**
- ``block_id`` *(optional)* — The identifier of the form block, if not passed, the first available formblock selected.
- ``counter_value`` *(optional)* — The value to set the counter to (default: 0).
**Description:**
This endpoint resets the form counter to a specified value.
**Request Example:**
.. code-block:: http
PATCH /my-document/@counter
Content-Type: application/json
{
"block_id": "form_block_123",
"counter_value": 5
}
**Response:**
- **Status Code:** ``204 No Content``
The response indicates that the counter has been successfully reset. No response body is returned.
-------------------------------------------
📊 Get Counter Value
-------------------------------------------
Retrieve the current counter value for a specific form block.
**Endpoint:**
.. code-block:: text
/<document>/@counter
**Method:**
``GET``
**Parameters:**
- ``block_id`` *(optional)* — The identifier of the form block. The first available is being selected if not passed.
**Description:**
This endpoint retrieves the current value of the form counter.
**Request Example:**
.. code-block:: http
GET /my-document/@counter?block_id=form_block_123
Accept: application/json
**Response:**
- **Status Code:** ``200 OK``
- **Response Body:**
.. code-block:: json
{
"counter_value": 5
}
Authors
-------
RedTurtle
Contributors
------------
- folix-01
Contribute
----------
- Issue Tracker: https://github.com/collective/collective.formsupport.counter/issues
- Source Code: https://github.com/collective/collective.formsupport.counter
- Documentation: https://docs.plone.org/foo/bar
Support
-------
If you are having issues, please let us know.
We have a mailing list located at: info@redturtle.it
License
-------
The project is licensed under the GPLv2.
Contributors
============
- RedTurtle, info@redturtle.it
Changelog
=========
1.0.1 (2025-01-10)
------------------
- Fix counter value persistence problem.
[folix-01]
1.0.0 (2025-01-09)
------------------
- Allignments with collective.volto.formsupport.
[folix-01]
1.0.0rc4 (2024-11-22)
---------------------
- Label translated
[mamico]
1.0.0rc3 (2024-11-19)
---------------------
- Fix counter
[mamico]
1.0.0rc2 (2024-11-15)
---------------------
- Fix manifest
[mamico]
1.0.0rc1 (2024-11-13)
---------------------
- Initial release.
[RedTurtle]
Raw data
{
"_id": null,
"home_page": "https://github.com/collective/collective.formsupport.counter",
"name": "collective.formsupport.counter",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "Python Plone CMS",
"author": "RedTurtle",
"author_email": "info@redturtle.it",
"download_url": "https://files.pythonhosted.org/packages/6a/1d/e521482c9c0bd2d2f69e2ec26ac7bb3b98abb66331e5905b6caa42c1d03d/collective.formsupport.counter-1.0.1.tar.gz",
"platform": null,
"description": ".. image:: https://img.shields.io/pypi/v/collective.formsupport.counter.svg\n :target: https://pypi.python.org/pypi/collective.formsupport.counter/\n :alt: Latest Version\n\n.. image:: https://img.shields.io/pypi/status/collective.formsupport.counter.svg\n :target: https://pypi.python.org/pypi/collective.formsupport.counter\n :alt: Egg Status\n\n.. image:: https://img.shields.io/pypi/pyversions/collective.formsupport.counter.svg?style=plastic\n :target: https://pypi.python.org/pypi/collective.formsupport.counter/\n :alt: Supported - Python Versions\n\n.. image:: https://img.shields.io/pypi/l/collective.formsupport.counter.svg\n :target: https://pypi.python.org/pypi/collective.formsupport.counter/\n :alt: License\n\n.. image:: https://coveralls.io/repos/github/collective/collective.formsupport.counter/badge.svg\n :target: https://coveralls.io/github/collective/collective.formsupport.counter\n :alt: Coverage\n\n\n==============================\ncollective.formsupport.counter\n==============================\n\nCounter integration for `collective.volto.formsupport <https://github.com/collective/collective.volto.formsupport>`_\n\nFeatures\n--------\n\n- Form counter for `collective.volto.formsupport <https://github.com/collective/collective.volto.formsupport>`_ >= 3.2\n\n\nInstallation\n------------\n\nInstall collective.formsupport.counter by adding it to your buildout::\n\n [buildout]\n\n ...\n\n eggs =\n collective.formsupport.counter\n\n\nand then running ``bin/buildout``\n\nREST API\n========\n-------------------------------------------\n\ud83d\udd04 Reset Form Counter\n-------------------------------------------\n\nReset the counter for a specific form block.\n\n**Endpoint:**\n\n.. code-block:: text\n\n /<document>/@counter\n\n**Method:**\n\n``PATCH``\n\n**Parameters:**\n\n- ``block_id`` *(optional)* \u2014 The identifier of the form block, if not passed, the first available formblock selected.\n- ``counter_value`` *(optional)* \u2014 The value to set the counter to (default: 0).\n\n**Description:**\n\nThis endpoint resets the form counter to a specified value.\n\n**Request Example:**\n\n.. code-block:: http\n\n PATCH /my-document/@counter\n Content-Type: application/json\n\n {\n \"block_id\": \"form_block_123\",\n \"counter_value\": 5\n }\n\n**Response:**\n\n- **Status Code:** ``204 No Content``\n\n The response indicates that the counter has been successfully reset. No response body is returned.\n\n-------------------------------------------\n\ud83d\udcca Get Counter Value\n-------------------------------------------\n\nRetrieve the current counter value for a specific form block.\n\n**Endpoint:**\n\n.. code-block:: text\n\n /<document>/@counter\n\n**Method:**\n\n``GET``\n\n**Parameters:**\n\n- ``block_id`` *(optional)* \u2014 The identifier of the form block. The first available is being selected if not passed.\n\n**Description:**\n\nThis endpoint retrieves the current value of the form counter.\n\n**Request Example:**\n\n.. code-block:: http\n\n GET /my-document/@counter?block_id=form_block_123\n Accept: application/json\n\n**Response:**\n\n- **Status Code:** ``200 OK``\n\n- **Response Body:**\n\n.. code-block:: json\n\n {\n \"counter_value\": 5\n }\n\n\nAuthors\n-------\n\nRedTurtle\n\n\nContributors\n------------\n\n- folix-01\n\nContribute\n----------\n\n- Issue Tracker: https://github.com/collective/collective.formsupport.counter/issues\n- Source Code: https://github.com/collective/collective.formsupport.counter\n- Documentation: https://docs.plone.org/foo/bar\n\n\nSupport\n-------\n\nIf you are having issues, please let us know.\nWe have a mailing list located at: info@redturtle.it\n\n\nLicense\n-------\n\nThe project is licensed under the GPLv2.\n\n\nContributors\n============\n\n- RedTurtle, info@redturtle.it\n\n\nChangelog\n=========\n\n\n1.0.1 (2025-01-10)\n------------------\n\n- Fix counter value persistence problem.\n [folix-01]\n\n\n1.0.0 (2025-01-09)\n------------------\n\n- Allignments with collective.volto.formsupport.\n [folix-01]\n\n\n1.0.0rc4 (2024-11-22)\n---------------------\n\n- Label translated\n [mamico]\n\n\n1.0.0rc3 (2024-11-19)\n---------------------\n\n- Fix counter\n [mamico]\n\n\n1.0.0rc2 (2024-11-15)\n---------------------\n\n- Fix manifest\n [mamico]\n\n\n1.0.0rc1 (2024-11-13)\n---------------------\n\n- Initial release.\n [RedTurtle]",
"bugtrack_url": null,
"license": "GPL version 2",
"summary": "Counter integration for collective.volto.formsupport",
"version": "1.0.1",
"project_urls": {
"Homepage": "https://github.com/collective/collective.formsupport.counter",
"PyPI": "https://pypi.org/project/collective.formsupport.counter/",
"Source": "https://github.com/collective/collective.formsupport.counter",
"Tracker": "https://github.com/collective/collective.formsupport.counter/issues"
},
"split_keywords": [
"python",
"plone",
"cms"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6a1de521482c9c0bd2d2f69e2ec26ac7bb3b98abb66331e5905b6caa42c1d03d",
"md5": "38e02e092761d774a190a80fc4d42eb9",
"sha256": "1e11aa7d83cf419330dcbc5cfa6b69581351cdc1d313364840840acc24dbeb16"
},
"downloads": -1,
"filename": "collective.formsupport.counter-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "38e02e092761d774a190a80fc4d42eb9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 24417,
"upload_time": "2025-01-10T09:27:34",
"upload_time_iso_8601": "2025-01-10T09:27:34.749121Z",
"url": "https://files.pythonhosted.org/packages/6a/1d/e521482c9c0bd2d2f69e2ec26ac7bb3b98abb66331e5905b6caa42c1d03d/collective.formsupport.counter-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-10 09:27:34",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "collective",
"github_project": "collective.formsupport.counter",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"requirements": [],
"tox": true,
"lcname": "collective.formsupport.counter"
}