Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/collective/collective.immediatecreate
Create an dexterity item immediatly and skip add form
https://github.com/collective/collective.immediatecreate
Last synced: about 1 month ago
JSON representation
Create an dexterity item immediatly and skip add form
- Host: GitHub
- URL: https://github.com/collective/collective.immediatecreate
- Owner: collective
- License: gpl-2.0
- Created: 2018-06-21T17:43:01.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2023-07-20T14:47:07.000Z (over 1 year ago)
- Last Synced: 2024-11-02T17:36:18.255Z (about 1 month ago)
- Language: Python
- Homepage: https://pypi.org/project/collective.immediatecreate/
- Size: 297 KB
- Stars: 0
- Watchers: 10
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
- License: LICENSE.GPL
Awesome Lists containing this project
- awesome-plone - collective.immediatecreate - Create content immediatly and skip the add form. (Content and utilities for content)
README
.. 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/blackFolderish 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 ..." 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.immediatecreateand 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
string:${folder_url}/++addimmediate++MyFolderishType
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 `_.
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 `_ with 79 chars line length.
Support
-------Maintainers are `Jens Klein `_, `Gogo Bernhard `_, `Markus Hilbert `_ 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.