giant-plugins


Namegiant-plugins JSON
Version 1.0.18 PyPI version JSON
download
home_pagehttps://github.com/giantmade/giant-plugins
SummaryAdds a generic list of plugins for use within projects
upload_time2023-06-22 09:38:07
maintainer
docs_urlNone
authorWill-Hoey
requires_python>=3.9,<4.0
licenseMIT
keywords plugins app
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Giant Plugins

A re-usable package which can be used in any project that requires a base set of plugins. 

This will include a small set of plugins that are used in a large number of projects, but will not necessarily cover the full requirements. It will also provide a RichText field which can be used in other areas of the project
The RichText field uses ![summernote](https://github.com/summernote/summernote/) for styling the WYSIWYG widget.


Supported Django versions:

- Django 2.2, 3.2

Supported django CMS versions:

- django CMS 3.8, 3.9

> &#x26a0;&#xfe0f; Release 1.0.0 and above are NOT compatible with
> versions < 1 due to model name changes and a migration reset. Only upgrade to
> this version if you are aware of what changes need to be made

## Installation

To install with the package manager, run:

    $ poetry add giant-plugins

You should then add `"giant_plugins"` to the `INSTALLED_APPS` in `base.py`.

You must also make sure that `"filer"` is in your `INSTALLED_APPS` in `base.py`.

The structure of these files is slightly different than the norm, allowing for more control
over which plugins are added to the Django project. In order to add the plugins it is
advised to create a `PLUGINS` variable in your settings file which will be appended to the
`INSTALLED_APPS`. The following snippet will install all of the currently available plugins (note that this should be tweaked to suit your needs):

```
PLUGINS = [
    "giant_plugins.content_width_image",
    "giant_plugins.content_width_video",
    "giant_plugins.donate",
    "giant_plugins.featured_cta",
    "giant_plugins.hero_image",
    "giant_plugins.logo_grid",
    "giant_plugins.page_card",
    "giant_plugins.pullquote",
    "giant_plugins.rich_text",
    "giant_plugins.share_this_page",
    "giant_plugins.gallery",
    "giant_plugins.key_stats",
    "giant_plugins.multilink",
]

INSTALLED_APPS = [...] + PLUGINS
```
Once these have been added as such you can now run the `migrate` command and create the tables for the
installed plugins.

## Configuration

If you do not have a default WYSIWYG config then you can use the following settings:

```
SUMMERNOTE_CONFIG = (
    {
        "iframe": True,
        "summernote": {
            "airMode": False,
            # Change editor size
            "width": "100%",
            "height": "480",
            "lang": None,
            "toolbar": [
                ["style", ["style"]],
                ["font", ["bold", "underline", "clear"]],
                ["fontname", ["fontname"]],
                ["color", ["color"]],
                ["para", ["ul", "ol", "paragraph"]],
                ["table", ["table"]],
                ["insert", ["link", "picture", "video"]],
                ["view", ["fullscreen", "codeview", "help"]],
            ],
        },
    },
)

```

In order to specify a form to use for a specific plugin you should add something like this to your settings file:

```
<PLUGIN_NAME>_FORM = "<path.to.form.FormClass>"
```

Where PLUGIN_NAME is the capitalised name of the plugin (e.g `TEXTWITHIMAGEPLUGIN_FORM`) and the path to the form class as a string so it can be imported.

## Local development

In order to run `django-admin` commands you will need to set the `DJANGO_SETTINGS_MODULE` variable by running

    $ export DJANGO_SETTINGS_MODULE=settings

When adding a plugin you should add the new plugin to the `PLUGINS` variable in your settings file
and to this README.



 ## Preparing for release
 
 In order to prep the package for a new release on TestPyPi and PyPi there is one key thing that you need to do. You need to update the version number in the `pyproject.toml`.
 This is so that the package can be published without running into version number conflicts. The version numbering must also follow the Semantic Version rules which can be found here https://semver.org/.
 
 
 ## Publishing
 
 Publishing a package with poetry is incredibly easy. Once you have checked that the version number has been updated (not the same as a previous version) then you only need to run two commands.
 
    $ `poetry build` 

will package the project up for you into a way that can be published.
 
    $ `poetry publish`

will publish the package to PyPi. You will need to enter the username and password for the account which can be found in the company password manager

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/giantmade/giant-plugins",
    "name": "giant-plugins",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<4.0",
    "maintainer_email": "",
    "keywords": "plugins,app",
    "author": "Will-Hoey",
    "author_email": "will.hoey@giantdigital.co.uk",
    "download_url": "https://files.pythonhosted.org/packages/8e/45/09c0b0e1cadce8676ba292c61fd81d87efe74b694595a7b496990ecc577a/giant_plugins-1.0.18.tar.gz",
    "platform": null,
    "description": "# Giant Plugins\n\nA re-usable package which can be used in any project that requires a base set of plugins. \n\nThis will include a small set of plugins that are used in a large number of projects, but will not necessarily cover the full requirements. It will also provide a RichText field which can be used in other areas of the project\nThe RichText field uses ![summernote](https://github.com/summernote/summernote/) for styling the WYSIWYG widget.\n\n\nSupported Django versions:\n\n- Django 2.2, 3.2\n\nSupported django CMS versions:\n\n- django CMS 3.8, 3.9\n\n> &#x26a0;&#xfe0f; Release 1.0.0 and above are NOT compatible with\n> versions < 1 due to model name changes and a migration reset. Only upgrade to\n> this version if you are aware of what changes need to be made\n\n## Installation\n\nTo install with the package manager, run:\n\n    $ poetry add giant-plugins\n\nYou should then add `\"giant_plugins\"` to the `INSTALLED_APPS` in `base.py`.\n\nYou must also make sure that `\"filer\"` is in your `INSTALLED_APPS` in `base.py`.\n\nThe structure of these files is slightly different than the norm, allowing for more control\nover which plugins are added to the Django project. In order to add the plugins it is\nadvised to create a `PLUGINS` variable in your settings file which will be appended to the\n`INSTALLED_APPS`. The following snippet will install all of the currently available plugins (note that this should be tweaked to suit your needs):\n\n```\nPLUGINS = [\n    \"giant_plugins.content_width_image\",\n    \"giant_plugins.content_width_video\",\n    \"giant_plugins.donate\",\n    \"giant_plugins.featured_cta\",\n    \"giant_plugins.hero_image\",\n    \"giant_plugins.logo_grid\",\n    \"giant_plugins.page_card\",\n    \"giant_plugins.pullquote\",\n    \"giant_plugins.rich_text\",\n    \"giant_plugins.share_this_page\",\n    \"giant_plugins.gallery\",\n    \"giant_plugins.key_stats\",\n    \"giant_plugins.multilink\",\n]\n\nINSTALLED_APPS = [...] + PLUGINS\n```\nOnce these have been added as such you can now run the `migrate` command and create the tables for the\ninstalled plugins.\n\n## Configuration\n\nIf you do not have a default WYSIWYG config then you can use the following settings:\n\n```\nSUMMERNOTE_CONFIG = (\n    {\n        \"iframe\": True,\n        \"summernote\": {\n            \"airMode\": False,\n            # Change editor size\n            \"width\": \"100%\",\n            \"height\": \"480\",\n            \"lang\": None,\n            \"toolbar\": [\n                [\"style\", [\"style\"]],\n                [\"font\", [\"bold\", \"underline\", \"clear\"]],\n                [\"fontname\", [\"fontname\"]],\n                [\"color\", [\"color\"]],\n                [\"para\", [\"ul\", \"ol\", \"paragraph\"]],\n                [\"table\", [\"table\"]],\n                [\"insert\", [\"link\", \"picture\", \"video\"]],\n                [\"view\", [\"fullscreen\", \"codeview\", \"help\"]],\n            ],\n        },\n    },\n)\n\n```\n\nIn order to specify a form to use for a specific plugin you should add something like this to your settings file:\n\n```\n<PLUGIN_NAME>_FORM = \"<path.to.form.FormClass>\"\n```\n\nWhere PLUGIN_NAME is the capitalised name of the plugin (e.g `TEXTWITHIMAGEPLUGIN_FORM`) and the path to the form class as a string so it can be imported.\n\n## Local development\n\nIn order to run `django-admin` commands you will need to set the `DJANGO_SETTINGS_MODULE` variable by running\n\n    $ export DJANGO_SETTINGS_MODULE=settings\n\nWhen adding a plugin you should add the new plugin to the `PLUGINS` variable in your settings file\nand to this README.\n\n\n\n ## Preparing for release\n \n In order to prep the package for a new release on TestPyPi and PyPi there is one key thing that you need to do. You need to update the version number in the `pyproject.toml`.\n This is so that the package can be published without running into version number conflicts. The version numbering must also follow the Semantic Version rules which can be found here https://semver.org/.\n \n \n ## Publishing\n \n Publishing a package with poetry is incredibly easy. Once you have checked that the version number has been updated (not the same as a previous version) then you only need to run two commands.\n \n    $ `poetry build` \n\nwill package the project up for you into a way that can be published.\n \n    $ `poetry publish`\n\nwill publish the package to PyPi. You will need to enter the username and password for the account which can be found in the company password manager\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Adds a generic list of plugins for use within projects",
    "version": "1.0.18",
    "project_urls": {
        "Homepage": "https://github.com/giantmade/giant-plugins",
        "Repository": "https://github.com/giantmade/giant-plugins"
    },
    "split_keywords": [
        "plugins",
        "app"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c6e758b5ee48e3b6ea849584cf00b8e4bcfed564fc491c8a01948529b5d812b9",
                "md5": "058d752b568cbc51300a411556caedbf",
                "sha256": "1e07cebc202bc44418c69b53b86c7dfd195dd53f12ea529bc67a5920c0aed1ac"
            },
            "downloads": -1,
            "filename": "giant_plugins-1.0.18-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "058d752b568cbc51300a411556caedbf",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<4.0",
            "size": 1465164,
            "upload_time": "2023-06-22T09:38:05",
            "upload_time_iso_8601": "2023-06-22T09:38:05.675794Z",
            "url": "https://files.pythonhosted.org/packages/c6/e7/58b5ee48e3b6ea849584cf00b8e4bcfed564fc491c8a01948529b5d812b9/giant_plugins-1.0.18-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8e4509c0b0e1cadce8676ba292c61fd81d87efe74b694595a7b496990ecc577a",
                "md5": "d0f8706413407bfed4a1eb100e309c59",
                "sha256": "8fec555bfdf6b7e71fba472f2d66294ba741ab5f42689088cc90f9da0c4f9bdd"
            },
            "downloads": -1,
            "filename": "giant_plugins-1.0.18.tar.gz",
            "has_sig": false,
            "md5_digest": "d0f8706413407bfed4a1eb100e309c59",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<4.0",
            "size": 1219373,
            "upload_time": "2023-06-22T09:38:07",
            "upload_time_iso_8601": "2023-06-22T09:38:07.659871Z",
            "url": "https://files.pythonhosted.org/packages/8e/45/09c0b0e1cadce8676ba292c61fd81d87efe74b694595a7b496990ecc577a/giant_plugins-1.0.18.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-22 09:38:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "giantmade",
    "github_project": "giant-plugins",
    "github_not_found": true,
    "lcname": "giant-plugins"
}
        
Elapsed time: 0.10368s