collective.immediatecreate


Namecollective.immediatecreate JSON
Version 2.0.1 PyPI version JSON
download
home_pagehttps://pypi.python.org/pypi/collective.immediatecreate
SummaryCreate dexterity items immediatly and skips add form.
upload_time2023-07-20 14:46:57
maintainer
docs_urlNone
authorJens W. Klein
requires_python
licenseGPL version 2
keywords python plone
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. This README is meant for consumption by humans and pypi. Pypi can render rst files so please do not use Sphinx features.
   If you want to learn more about writing documentation, please check out: http://docs.plone.org/about/documentation_styleguide.html
   This text does not appear on pypi or github. It is a comment.

==========================
collective.immediatecreate
==========================

.. image:: https://img.shields.io/pypi/v/collective.immediatecreate.svg
    :target: https://pypi.org/project/collective.immediatecreate/
    :alt: Latest PyPI version

.. image:: https://github.com/collective/collective.immediatecreate/actions/workflows/test.yml/badge.svg
    :target: https://github.com/collective/collective.immediatecreate/actions/workflows/test.yml

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
    :target: https://github.com/ambv/black

Folderish types are designed to be able to contain content.
When you use ``collective.folderishtypes`` (or any custom folderish types) in Plone and you simply add a folderish item on edit (like an image in TinyMCE), then  after adding you will see that all the assets you upload through the editor will be stored as siblings of the item you just created.
This is due to the fact that the new item does not "exist" yet - it is just an add-form - that is, before it has been saved once.

This addon creates the object immediately, so items can be stored inside.

Features
--------

ID/ Shortname
    A valid (and intermediate) ID will be generated after "add <Type>..." has been clicked, so the item can be persisted.
    However, the ID changes when the user saves the content for the first time so the Plone's default behavior is retained.
    This feature might not be wanted by some users and is configureable (todo).

Verification
    Additionally the drop-in-feature covers the usecase when an added type has mandatory fields or custom verification.
    All verification tasks are performed as usual when the user saves an item.

Cancel becomes Delete
    When the user interacts with the item after it has been automatically created the "cancel" button is turned into a "delete" button.
    If the cancel button is clicked, the item will be discarded.

Cleanup
    In order to get rid of initially created but never saved nor deleted items,
    a cleanup script is provided.


Installation
------------

Install ``collective.immediatecreate`` by adding it to your buildout:

.. code-block:: INI

    [buildout]
    # ...
    eggs =
        collective.immediatecreate


and then running ``bin/buildout``

Restart Plone and install ``Immediate Create`` in control panel under addons.


Activation
----------

After installation nothing changed.
The feature must be activated for a content-type first.
To make a type available for immediate create, two changes need to be done:

1. Add the behavior `collective.immediatecreate` to the type in the control panel under `Dexterity Content Types`

2. Modify the Factory Type Information using the ZMI under `portal_types`.
   Change the value of  `Add view URL (Expression)` to `++addimmediate++TYPENAME`.

Configuration using GenericSetup
--------------------------------

In a policy profile in filesystem the a Type Information under `profiles/default/types/TYPENAME.xml` can be edited to make a type aware of immediate create:

.. code-block:: XML

   <?xml version="1.0"?>
   <object
     i18n:domain="plone"
     meta_type="Dexterity FTI"
     name="MyFolderishType"
     xmlns:i18n="http://xml.zope.org/namespaces/i18n">

     <!-- ... SNIP ... -->

     <property name="add_view_expr">string:${folder_url}/++addimmediate++MyFolderishType</property>

     <!-- ... SNIP ... -->

     <!-- Enabled behaviors -->
     <property name="behaviors" purge="False">
       <element value="collective.immediatecreate" />
     </property>

     <!-- ... SNIP ... -->
   </object>

Cleanup
-------

A cleanup script can be called as Manager user.
It removes all stalled creations older than two hours.
It is named ``@@immediatecreate-cleanup-leftovers``.
You may want to use a cron service of your choice to call it recurring.


Source Code
-----------

The sources are in a GIT DVCS with its main branches at `github <http://github.com/collective/collective.immediatecreate>`_.
There you can report issue too.

We'd be happy to see many forks and pull-requests to make this addon even better.

This package uses the `black coding style <https://github.com/ambv/black/>`_ with 79 chars line length.


Support
-------

Maintainers are `Jens Klein <mailto:jk@kleinundpartner.at>`_, `Gogo Bernhard <mailto:G.Bernhard@akbild.ac.at>`_, `Markus Hilbert <mailto:markus.hilbert@iham.at>`_ and the BlueDynamics Alliance developer team.
We appreciate any contribution and if a release is needed to be done on pypi, please just contact one of us.
We also offer commercial support if any training, coaching, integration or adaptions are needed.

If you are having issues, please let us know.


License
-------

The project is licensed under the GPLv2.


Contributors
============

- Jens W. Klein, jk@kleinundpartner.at
- Gogo Bernhard, g.bernhard@akbild.ac.at
- Markus Hilbert, markus.hilbert@iham.at


Changelog
=========

2.0.1 (2023-07-20)
------------------

- Fix cancel button on form validation if immediate create for has a validation error.
  [jensens]


2.0.0 (2023-06-14)
------------------

- Towards Plone 6, Python 3 (only).
  [jensens]

1.0a3 (2018-11-07)
------------------

- added ImmediateAddedEvent.[iham]
- fixed code-styles. [jensens]

1.0a2 (2018-09-12)
------------------

- fixed locking [iham]
- robot test added [llisa123]


1.0a1 (2018-06-23)
------------------

- Initial release.
  [jensens]

            

Raw data

            {
    "_id": null,
    "home_page": "https://pypi.python.org/pypi/collective.immediatecreate",
    "name": "collective.immediatecreate",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Python Plone",
    "author": "Jens W. Klein",
    "author_email": "jk@kleinundpartner.at",
    "download_url": "https://files.pythonhosted.org/packages/2e/f4/975ce510ea387b18fefdda3e52c81a4e9b761348156b427bc3c624aad72b/collective.immediatecreate-2.0.1.tar.gz",
    "platform": null,
    "description": ".. This README is meant for consumption by humans and pypi. Pypi can render rst files so please do not use Sphinx features.\n   If you want to learn more about writing documentation, please check out: http://docs.plone.org/about/documentation_styleguide.html\n   This text does not appear on pypi or github. It is a comment.\n\n==========================\ncollective.immediatecreate\n==========================\n\n.. image:: https://img.shields.io/pypi/v/collective.immediatecreate.svg\n    :target: https://pypi.org/project/collective.immediatecreate/\n    :alt: Latest PyPI version\n\n.. image:: https://github.com/collective/collective.immediatecreate/actions/workflows/test.yml/badge.svg\n    :target: https://github.com/collective/collective.immediatecreate/actions/workflows/test.yml\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n    :target: https://github.com/ambv/black\n\nFolderish types are designed to be able to contain content.\nWhen you use ``collective.folderishtypes`` (or any custom folderish types) in Plone and you simply add a folderish item on edit (like an image in TinyMCE), then  after adding you will see that all the assets you upload through the editor will be stored as siblings of the item you just created.\nThis is due to the fact that the new item does not \"exist\" yet - it is just an add-form - that is, before it has been saved once.\n\nThis addon creates the object immediately, so items can be stored inside.\n\nFeatures\n--------\n\nID/ Shortname\n    A valid (and intermediate) ID will be generated after \"add <Type>...\" has been clicked, so the item can be persisted.\n    However, the ID changes when the user saves the content for the first time so the Plone's default behavior is retained.\n    This feature might not be wanted by some users and is configureable (todo).\n\nVerification\n    Additionally the drop-in-feature covers the usecase when an added type has mandatory fields or custom verification.\n    All verification tasks are performed as usual when the user saves an item.\n\nCancel becomes Delete\n    When the user interacts with the item after it has been automatically created the \"cancel\" button is turned into a \"delete\" button.\n    If the cancel button is clicked, the item will be discarded.\n\nCleanup\n    In order to get rid of initially created but never saved nor deleted items,\n    a cleanup script is provided.\n\n\nInstallation\n------------\n\nInstall ``collective.immediatecreate`` by adding it to your buildout:\n\n.. code-block:: INI\n\n    [buildout]\n    # ...\n    eggs =\n        collective.immediatecreate\n\n\nand then running ``bin/buildout``\n\nRestart Plone and install ``Immediate Create`` in control panel under addons.\n\n\nActivation\n----------\n\nAfter installation nothing changed.\nThe feature must be activated for a content-type first.\nTo make a type available for immediate create, two changes need to be done:\n\n1. Add the behavior `collective.immediatecreate` to the type in the control panel under `Dexterity Content Types`\n\n2. Modify the Factory Type Information using the ZMI under `portal_types`.\n   Change the value of  `Add view URL (Expression)` to `++addimmediate++TYPENAME`.\n\nConfiguration using GenericSetup\n--------------------------------\n\nIn a policy profile in filesystem the a Type Information under `profiles/default/types/TYPENAME.xml` can be edited to make a type aware of immediate create:\n\n.. code-block:: XML\n\n   <?xml version=\"1.0\"?>\n   <object\n     i18n:domain=\"plone\"\n     meta_type=\"Dexterity FTI\"\n     name=\"MyFolderishType\"\n     xmlns:i18n=\"http://xml.zope.org/namespaces/i18n\">\n\n     <!-- ... SNIP ... -->\n\n     <property name=\"add_view_expr\">string:${folder_url}/++addimmediate++MyFolderishType</property>\n\n     <!-- ... SNIP ... -->\n\n     <!-- Enabled behaviors -->\n     <property name=\"behaviors\" purge=\"False\">\n       <element value=\"collective.immediatecreate\" />\n     </property>\n\n     <!-- ... SNIP ... -->\n   </object>\n\nCleanup\n-------\n\nA cleanup script can be called as Manager user.\nIt removes all stalled creations older than two hours.\nIt is named ``@@immediatecreate-cleanup-leftovers``.\nYou may want to use a cron service of your choice to call it recurring.\n\n\nSource Code\n-----------\n\nThe sources are in a GIT DVCS with its main branches at `github <http://github.com/collective/collective.immediatecreate>`_.\nThere you can report issue too.\n\nWe'd be happy to see many forks and pull-requests to make this addon even better.\n\nThis package uses the `black coding style <https://github.com/ambv/black/>`_ with 79 chars line length.\n\n\nSupport\n-------\n\nMaintainers are `Jens Klein <mailto:jk@kleinundpartner.at>`_, `Gogo Bernhard <mailto:G.Bernhard@akbild.ac.at>`_, `Markus Hilbert <mailto:markus.hilbert@iham.at>`_ and the BlueDynamics Alliance developer team.\nWe appreciate any contribution and if a release is needed to be done on pypi, please just contact one of us.\nWe also offer commercial support if any training, coaching, integration or adaptions are needed.\n\nIf you are having issues, please let us know.\n\n\nLicense\n-------\n\nThe project is licensed under the GPLv2.\n\n\nContributors\n============\n\n- Jens W. Klein, jk@kleinundpartner.at\n- Gogo Bernhard, g.bernhard@akbild.ac.at\n- Markus Hilbert, markus.hilbert@iham.at\n\n\nChangelog\n=========\n\n2.0.1 (2023-07-20)\n------------------\n\n- Fix cancel button on form validation if immediate create for has a validation error.\n  [jensens]\n\n\n2.0.0 (2023-06-14)\n------------------\n\n- Towards Plone 6, Python 3 (only).\n  [jensens]\n\n1.0a3 (2018-11-07)\n------------------\n\n- added ImmediateAddedEvent.[iham]\n- fixed code-styles. [jensens]\n\n1.0a2 (2018-09-12)\n------------------\n\n- fixed locking [iham]\n- robot test added [llisa123]\n\n\n1.0a1 (2018-06-23)\n------------------\n\n- Initial release.\n  [jensens]\n",
    "bugtrack_url": null,
    "license": "GPL version 2",
    "summary": "Create dexterity items immediatly and skips add form.",
    "version": "2.0.1",
    "project_urls": {
        "Homepage": "https://pypi.python.org/pypi/collective.immediatecreate"
    },
    "split_keywords": [
        "python",
        "plone"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a6d155e50278fab06adab77265698abd67ebcfe1e75224a368a864c58b496cde",
                "md5": "af32cf980d530120f1ced73dad1cc4cc",
                "sha256": "bb6ea398be51b18e023696ce7957be62da8624b338d48e0a90e95f09f9787e70"
            },
            "downloads": -1,
            "filename": "collective.immediatecreate-2.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "af32cf980d530120f1ced73dad1cc4cc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 245471,
            "upload_time": "2023-07-20T14:46:53",
            "upload_time_iso_8601": "2023-07-20T14:46:53.921965Z",
            "url": "https://files.pythonhosted.org/packages/a6/d1/55e50278fab06adab77265698abd67ebcfe1e75224a368a864c58b496cde/collective.immediatecreate-2.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2ef4975ce510ea387b18fefdda3e52c81a4e9b761348156b427bc3c624aad72b",
                "md5": "5447755e6577359a09b46c9ca123624c",
                "sha256": "a88c3df29794db5b5a9b6a43ce1af467514cc40eefd4baf0c57332a77716182e"
            },
            "downloads": -1,
            "filename": "collective.immediatecreate-2.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "5447755e6577359a09b46c9ca123624c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 242918,
            "upload_time": "2023-07-20T14:46:57",
            "upload_time_iso_8601": "2023-07-20T14:46:57.405100Z",
            "url": "https://files.pythonhosted.org/packages/2e/f4/975ce510ea387b18fefdda3e52c81a4e9b761348156b427bc3c624aad72b/collective.immediatecreate-2.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-20 14:46:57",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "collective.immediatecreate"
}
        
Elapsed time: 0.09087s