{ "info": { "author": "Franz Gerhard Reinisch", "author_email": "franz@fgrcon.net", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Plone", "Framework :: Plone :: 5.1", "Framework :: Plone :: 5.2", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.6" ], "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.fgrcon.pgeasyform\n============================\n\nThis addon extends collective.easyform (https://pypi.org/project/collective.easyform/) providing means to store form data in a postgresql database\n\nFeatures\n--------\n\n- New form action: \"Postgres Data\" and corresponding PostgresDataHandler. \n Action configuration fields: Database connection string, database table name, decimal separator\n Example for database connection string: ``dbname='postgres' user=='postgres',host='localhost' password = 'secret'``\n \n when decimal separator is selected, commas are treated as decimal separators as well (helpful with devices)\n \n- if the database table does not exist in the database it will be created:\n\n - create a postgres data form action \n - define your form fields\n - fill out all fields of your form with sample data once and submit the form\n \n the database table will be generated in a way that the plone field ids serve as column names,\n the postgres data types are mapped accordingly to the python data types of the form fields.\n A primary key field (serial) with columname \"_id_\" will be generated automatically. This allows to view and edit \n the data using tools like pgadmin4 (https://www.pgadmin.org)\n \n \nPostgres\n--------\n\nYou can connect to any postgres server (localhost or remote). This addon has been tested with Postgres V 10.\n\nAn other easy way to get postgres up and running is to use docker:\n\n - Install docker\n\n - ``docker pull postgres:[tag_you_want]`` tag e. g.110.5\n \n Without ``.tag`` this will pull down the latest stable release Postgres image from the official Postgres docker hub repository.\n \n - Create a Directory to Serve as the Local Host Mount Point for Postgres Data Files\n If we want to persist data generated by the Postgres instance running inside a container beyond the container\u2019s lifecycle, we need to map a local mount point as a data volume to an appropriate path inside the container. Typically I create a volumes folder (we can give the folder any name we like) in my homedirectory and then create subfolders for each of the applications I need to create data volume mount points for.\n \n ``mkdir -p $HOME/docker/volumes/postgres``\n \n - Run the Postgres Container\n\n ``docker run --rm --name pg-docker -e POSTGRES_PASSWORD=docker -d -p 5432:5432 -v $HOME/docker/volumes/postgres:/var/lib/postgresql/data postgres`` \n\n Options: \n \n - rm: Automatically remove the container and it\u2019s associated file system upon exit. In general, if we are running lots of short term containers, it is good practice to to pass rm flag to the docker run command for automatic cleanup and avoid disk space issues. We can always use the v option (described below) to persist data beyond the lifecycle of a container\n \n - name: An identifying name for the container. We can choose any name we want. Note that two existing (even if they are stopped) containers cannot have the same name. In order to re-use a name, you would either need pass the rm flag to the docker run command or explicitly remove the container by using the command docker rm [container name].\n - e: Expose environment variable of name POSTGRES_PASSWORD with value docker to the container. This environment variable sets the superuser password for PostgreSQL. We can set POSTGRES_PASSWORD to anything we like. I just choose it to be docker for demonstration. There are additional environment variables you can set. These include POSTGRES_USER and POSTGRES_DB. POSTGRES_USER sets the superuser name. If not provided, the superuser name defaults to postgres.POSTGRES_DB sets the name of the default database to setup. If not provided, it defaults to the value of POSTGRES_USER.\n - d: Launches the container in detached mode or in other words, in the background.\n - p: Bind port 5432 on localhost to port 5432 within the container. This option enables applications running out side of the container to be able to connect to the Postgres server running inside the container.\n - v: Mount $HOME/docker/volumes/postgres on the host machine to the container side volume path /var/lib/postgresql/data created inside the container. This ensures that postgres data persists even after the container is removed.\n\n - Connect to Postgres\n\nOnce the container is up an running, connecting to it from an application is no different than connecting to a Postgres instance running outside a docker container. For example, to connect using psql we can execute\n\n ``psql -h localhost -U postgres -d postgres``\n\n\nTranslations\n------------\n\nNo translations yet\n\nInstallation\n------------\n\nInstall collective.fgrcon.pgeasyform by adding it to your buildout::\n\n [buildout]\n\n ...\n\n eggs =\n collective.fgrcon.pgeasyform\n\n\nand then running ``bin/buildout``\n\nThis addoon requires ``collective.easyform`` and ``psycopg2``\n\nContribute\n----------\n\n- Issue Tracker: https://github.com/collective/collective.fgrcon.pgeasyform/issues\n- Source Code: https://github.com/collective/collective.fgrcon.pgeasyform\n\n\nSupport\n-------\n\nIf you are having issues, please let us know (use the issue tracker or mail to franz@fgrcon.net).\n\n\nLicense\n-------\n\nThe project is licensed under the GPLv2.\n\n\nContributors\n============\n\n- Franz Gerhard Reinisch, franz@fgrcon.net\n\n\nChangelog\n=========\n\n\n1.1 (2019-06-19)\n----------------\n\n- Initial release.\n [fgrcon]", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://pypi.python.org/pypi/collective.fgrcon.pgeasyform", "keywords": "Python Plone", "license": "GPL version 2", "maintainer": "", "maintainer_email": "", "name": "collective.fgrcon.pgeasyform", "package_url": "https://pypi.org/project/collective.fgrcon.pgeasyform/", "platform": "", "project_url": "https://pypi.org/project/collective.fgrcon.pgeasyform/", "project_urls": { "Homepage": "https://pypi.python.org/pypi/collective.fgrcon.pgeasyform" }, "release_url": "https://pypi.org/project/collective.fgrcon.pgeasyform/1.1/", "requires_dist": null, "requires_python": "", "summary": "Extend collective.easyform with a handler for Postgresql", "version": "1.1" }, "last_serial": 5420583, "releases": { "1.1": [ { "comment_text": "", "digests": { "md5": "b9136e4933fec722c638adeb336b2eba", "sha256": "86e82f6e80fc4bc57fc5101f949831990f42e273dcef967af17d23c9ca414ec9" }, "downloads": -1, "filename": "collective.fgrcon.pgeasyform-1.1.tar.gz", "has_sig": false, "md5_digest": "b9136e4933fec722c638adeb336b2eba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22834, "upload_time": "2019-06-19T14:21:42", "url": "https://files.pythonhosted.org/packages/c1/4d/c4b28ad6b4c4bdd76e05b3fe21c195f742fbae094e2976e6bccf6b0759bb/collective.fgrcon.pgeasyform-1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b9136e4933fec722c638adeb336b2eba", "sha256": "86e82f6e80fc4bc57fc5101f949831990f42e273dcef967af17d23c9ca414ec9" }, "downloads": -1, "filename": "collective.fgrcon.pgeasyform-1.1.tar.gz", "has_sig": false, "md5_digest": "b9136e4933fec722c638adeb336b2eba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22834, "upload_time": "2019-06-19T14:21:42", "url": "https://files.pythonhosted.org/packages/c1/4d/c4b28ad6b4c4bdd76e05b3fe21c195f742fbae094e2976e6bccf6b0759bb/collective.fgrcon.pgeasyform-1.1.tar.gz" } ] }