wagtail-lottie


Namewagtail-lottie JSON
Version 0.1.19 PyPI version JSON
download
home_pagehttps://github.com/Aleksi44/wagtail-lottie
SummaryWagtail Lottie
upload_time2023-07-10 15:28:24
maintainer
docs_urlNone
authorAlexis Le Baron
requires_python
licenseGPL-3.0
keywords wagtail lottie
VCS
bugtrack_url
requirements Django wagtail flake8 wagtail-generic-chooser django-storages boto3
Travis-CI No Travis.
coveralls test coverage No coveralls.
            **************
Wagtail Lottie
**************

.. image:: https://img.shields.io/pypi/v/wagtail_lottie
    :target: https://pypi.org/project/wagtail_lottie/

.. image:: https://img.shields.io/pypi/pyversions/wagtail_lottie
    :target: https://pypi.org/project/wagtail_lottie/


`Wagtail <https://github.com/wagtail/wagtail>`_ + `Lottie <https://github.com/airbnb/lottie-web>`_
is a Wagtail package
for playing `Adobe After Effects <https://www.adobe.com/products/aftereffects.html>`_ animations
exported as json with `Bodymovin <https://exchange.adobe.com/creativecloud.details.12557.html>`_.

.. image:: https://static.snoweb.io/media/wagtail-lottie.gif

Usage
#####

1. Export your animation from Adobe After Effect with Bodymovin.
2. Compress the folder in zip format.
3. Create a Lottie animation from Wagtail and add this zip file.

Can be used like this at Wagtail page level :

.. code-block:: python

    from wagtail_lottie.models import LottieAnimation
    from wagtail_lottie.widgets import LottieAnimationChooser
    from wagtail_lottie.blocks import LottieAnimationChooserBlock


    class HomePage(Page):
        lottie_animation_foreign_key = models.ForeignKey(LottieAnimation, on_delete=models.SET_NULL)
        lottie_animation_stream_field = StreamField([
            ('lottie_animation_block', LottieAnimationChooserBlock()),
            ('rich_text', blocks.RichTextBlock())
        ])

        content_panels = [
            FieldPanel('lottie_animation_foreign_key', widget=LottieAnimationChooser),
            StreamFieldPanel('lottie_animation_stream_field')
        ]


And rendered this way at html level :

.. code-block:: html


    <!-- For ForeignKey -->
    {% include 'wagtail_lottie/lottie_animation.html' with value=page.lottie_animation_foreign_key %}

    <!-- For StreamField -->
    {% for block in page.lottie_animation_stream_field %}
        {% include_block block %}
    {% endfor %}

    <!-- These scripts are required to launch animations -->
    <script src="{% static 'wagtail_lottie/lottie-player.js' %}"></script>
    <script src="{% static 'wagtail_lottie/lottie-animation.js' %}"></script>


Setup
#####

Install with pip :

.. code-block::

    pip install wagtail_lottie

Add **wagtail_lottie** to Django apps installed :

.. code-block:: python

    INSTALLED_APPS = [
        'wagtail_lottie',
        'wagtail.contrib.modeladmin',
        'generic_chooser',
        ...
    ]

Run some Django commands :

.. code-block::

    python manage.py collectstatic
    python manage.py migrate

Set if needed **Wagtail Lottie** download folder in the Django settings (default value is 'wagtail_lottie') :

.. code-block:: python

    WAGTAIL_LOTTIE_UPLOAD_FOLDER = 'custom_location'




            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Aleksi44/wagtail-lottie",
    "name": "wagtail-lottie",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "wagtail lottie",
    "author": "Alexis Le Baron",
    "author_email": "hello@snoweb.io",
    "download_url": "https://files.pythonhosted.org/packages/24/2a/3232c65862810a3cce7358f646b023df00203b2e4859a547018ab01ade82/wagtail_lottie-0.1.19.tar.gz",
    "platform": "linux",
    "description": "**************\nWagtail Lottie\n**************\n\n.. image:: https://img.shields.io/pypi/v/wagtail_lottie\n    :target: https://pypi.org/project/wagtail_lottie/\n\n.. image:: https://img.shields.io/pypi/pyversions/wagtail_lottie\n    :target: https://pypi.org/project/wagtail_lottie/\n\n\n`Wagtail <https://github.com/wagtail/wagtail>`_ + `Lottie <https://github.com/airbnb/lottie-web>`_\nis a Wagtail package\nfor playing `Adobe After Effects <https://www.adobe.com/products/aftereffects.html>`_ animations\nexported as json with `Bodymovin <https://exchange.adobe.com/creativecloud.details.12557.html>`_.\n\n.. image:: https://static.snoweb.io/media/wagtail-lottie.gif\n\nUsage\n#####\n\n1. Export your animation from Adobe After Effect with Bodymovin.\n2. Compress the folder in zip format.\n3. Create a Lottie animation from Wagtail and add this zip file.\n\nCan be used like this at Wagtail page level :\n\n.. code-block:: python\n\n    from wagtail_lottie.models import LottieAnimation\n    from wagtail_lottie.widgets import LottieAnimationChooser\n    from wagtail_lottie.blocks import LottieAnimationChooserBlock\n\n\n    class HomePage(Page):\n        lottie_animation_foreign_key = models.ForeignKey(LottieAnimation, on_delete=models.SET_NULL)\n        lottie_animation_stream_field = StreamField([\n            ('lottie_animation_block', LottieAnimationChooserBlock()),\n            ('rich_text', blocks.RichTextBlock())\n        ])\n\n        content_panels = [\n            FieldPanel('lottie_animation_foreign_key', widget=LottieAnimationChooser),\n            StreamFieldPanel('lottie_animation_stream_field')\n        ]\n\n\nAnd rendered this way at html level :\n\n.. code-block:: html\n\n\n    <!-- For ForeignKey -->\n    {% include 'wagtail_lottie/lottie_animation.html' with value=page.lottie_animation_foreign_key %}\n\n    <!-- For StreamField -->\n    {% for block in page.lottie_animation_stream_field %}\n        {% include_block block %}\n    {% endfor %}\n\n    <!-- These scripts are required to launch animations -->\n    <script src=\"{% static 'wagtail_lottie/lottie-player.js' %}\"></script>\n    <script src=\"{% static 'wagtail_lottie/lottie-animation.js' %}\"></script>\n\n\nSetup\n#####\n\nInstall with pip :\n\n.. code-block::\n\n    pip install wagtail_lottie\n\nAdd **wagtail_lottie** to Django apps installed :\n\n.. code-block:: python\n\n    INSTALLED_APPS = [\n        'wagtail_lottie',\n        'wagtail.contrib.modeladmin',\n        'generic_chooser',\n        ...\n    ]\n\nRun some Django commands :\n\n.. code-block::\n\n    python manage.py collectstatic\n    python manage.py migrate\n\nSet if needed **Wagtail Lottie** download folder in the Django settings (default value is 'wagtail_lottie') :\n\n.. code-block:: python\n\n    WAGTAIL_LOTTIE_UPLOAD_FOLDER = 'custom_location'\n\n\n\n",
    "bugtrack_url": null,
    "license": "GPL-3.0",
    "summary": "Wagtail Lottie",
    "version": "0.1.19",
    "project_urls": {
        "Homepage": "https://github.com/Aleksi44/wagtail-lottie"
    },
    "split_keywords": [
        "wagtail",
        "lottie"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c66e845074b7bdbd557dacea1708a8b738535cda0318a3acf93ccf843740602e",
                "md5": "3f5d7d2b5e480b494fbeccdc247f7bb9",
                "sha256": "36c46429d3d7ab86a54a068fda82a859b494eda90b7d39873f4f77bb46425c95"
            },
            "downloads": -1,
            "filename": "wagtail_lottie-0.1.19-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3f5d7d2b5e480b494fbeccdc247f7bb9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 99998,
            "upload_time": "2023-07-10T15:28:21",
            "upload_time_iso_8601": "2023-07-10T15:28:21.934373Z",
            "url": "https://files.pythonhosted.org/packages/c6/6e/845074b7bdbd557dacea1708a8b738535cda0318a3acf93ccf843740602e/wagtail_lottie-0.1.19-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "242a3232c65862810a3cce7358f646b023df00203b2e4859a547018ab01ade82",
                "md5": "1a296cb43af8230f575b79a6d2a69a0f",
                "sha256": "23198120fe6b5bb540d2d5ca77aa8c83ce56eec97c44e9c91df957baccd60e6b"
            },
            "downloads": -1,
            "filename": "wagtail_lottie-0.1.19.tar.gz",
            "has_sig": false,
            "md5_digest": "1a296cb43af8230f575b79a6d2a69a0f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 92988,
            "upload_time": "2023-07-10T15:28:24",
            "upload_time_iso_8601": "2023-07-10T15:28:24.185739Z",
            "url": "https://files.pythonhosted.org/packages/24/2a/3232c65862810a3cce7358f646b023df00203b2e4859a547018ab01ade82/wagtail_lottie-0.1.19.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-10 15:28:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Aleksi44",
    "github_project": "wagtail-lottie",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "Django",
            "specs": [
                [
                    "==",
                    "4.0.2"
                ]
            ]
        },
        {
            "name": "wagtail",
            "specs": [
                [
                    "==",
                    "5.0.2"
                ]
            ]
        },
        {
            "name": "flake8",
            "specs": [
                [
                    "==",
                    "4.0.1"
                ]
            ]
        },
        {
            "name": "wagtail-generic-chooser",
            "specs": [
                [
                    "==",
                    "0.5.1"
                ]
            ]
        },
        {
            "name": "django-storages",
            "specs": [
                [
                    "==",
                    "1.11.1"
                ]
            ]
        },
        {
            "name": "boto3",
            "specs": [
                [
                    "==",
                    "1.16.47"
                ]
            ]
        }
    ],
    "lcname": "wagtail-lottie"
}
        
Elapsed time: 0.42855s