Skip to main content

Embed Videos for Wagtail CMS

Project description

https://img.shields.io/pypi/v/wagtail-embedvideos.svg https://img.shields.io/pypi/dm/wagtail-embedvideos.svg https://img.shields.io/github/license/bashu/wagtail-embedvideos.svg https://img.shields.io/travis/bashu/wagtail-embedvideos.svg

Simple app that works similar to wagtailimages, but for embedding YouTube and Vimeo videos and music from SoundCloud.

The current version is tested for compatiblily with the following:

  • Wagtail versions 2.7 to 2.15

  • Django versions 2.2 to 3.2

  • Python versions 3.6 and 3.9

Maintained by Basil Shubin, and some great contributors.

https://raw.githubusercontent.com/bashu/wagtail-embedvideos/develop/screenshot.png

Installation

First install the module, preferably in a virtual environment. It can be installed from PyPI:

pip install wagtail-embedvideos

Requirements

You must have django-embed-video installed and configured, see the django-embed-video documentation for details and setup instructions.

Setup

Make sure the project is configured for django-embed-video.

Then add the following settings:

INSTALLED_APPS += (
    "wagtail_embed_videos",
)

Then run ./manage.py migrate to create the required database tables.

Usage

In models, implement as a ForeignKey relation, same as wagtailimages.

# models.py

from wagtail.core.models import Page, PageBase

from wagtail_embed_videos import get_embed_video_model_string
from wagtail_embed_videos.edit_handlers import EmbedVideoChooserPanel

class CustomPage(Page):
    video = models.ForeignKey(
        get_embed_video_model_string(),
        null=True, blank=True,
        on_delete=models.SET_NULL,
        related_name='+'
    )

    # ...

    content_panels = [
            EmbedVideoChooserPanel('video'),
    ]

In templates, load the embed_video_tags library in every template where you want to use it:

<!-- custom_page.html -->

{% load embed_video_tags %}

{% video self.video.url as my_video %}
    {% video my_video 'small' %}
{% endvideo %}

Check django-embed-video documentation for more details.

Contributing

If you like this module, forked it, or would like to improve it, please let us know! Pull requests are welcome too. :-)

Credits

wagtail-embedvideos was originally started by InfoPortugal, S.A. who has now unfortunately abandoned the project.

License

wagtail-embedvideos is released under the BSD license.

Changes

0.5.11 (2021-12-13)

  • Added ru translation.

0.5.10 (2021-12-06)

  • Fixed stupid typo.

0.5.9 (2021-12-06)

  • Wagtail version >= 2.15 supported.

0.5.8 (2021-11-12)

  • Wagtail version >= 2.14 supported.

0.5.7 (2021-11-11)

  • Wagtail version >= 2.13 supported.

0.5.6 (2021-11-10)

  • Wagtail version >= 2.12 supported.

0.5.5 (2021-11-09)

  • Wagtail version >= 2.11 supported.

0.5.4 (2021-11-08)

  • Wagtail version >= 2.10 supported.

0.5.3 (2021-11-07)

  • Replacing broken 0.5.2 release.

0.5.2 (2021-11-06)

  • Wagtail version >= 2.9 supported.

0.5.1 (2021-11-05)

  • Wagtail version >= 2.8 supported.

0.5.0 (2021-11-04)

  • Wagtail version >= 2.4 supported.

  • Dropped support for Python < 3.x.

0.4.1 (2018-08-22)

  • Wagtail version >= 2.x supported.

  • Django version >= 2.x supported.

  • Dropped support for Wagtail < 2.x.

0.3.0 (2017-04-24)

  • Changed the structure of “AbstractEmbedVideo”, because “TagSearchable” is not used anymore.

0.2.5 (2017-02-09)

  • This is the last version compatible with Wagtail <= 1.6, because TagSearchable was deprecated and then removed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wagtail-embedvideos-0.5.11.tar.gz (33.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wagtail_embedvideos-0.5.11-py3-none-any.whl (55.2 kB view details)

Uploaded Python 3

File details

Details for the file wagtail-embedvideos-0.5.11.tar.gz.

File metadata

  • Download URL: wagtail-embedvideos-0.5.11.tar.gz
  • Upload date:
  • Size: 33.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for wagtail-embedvideos-0.5.11.tar.gz
Algorithm Hash digest
SHA256 b4528fbdf4816bbdf0059840ab601dad2d31aab52881df61f712b083ac0aa9bc
MD5 8121b10d10660b821c6360e45c51db1e
BLAKE2b-256 65cdb4ce08d147a50b7f7906dd977f2d2bc67fac1428817dc176996ec8323510

See more details on using hashes here.

File details

Details for the file wagtail_embedvideos-0.5.11-py3-none-any.whl.

File metadata

  • Download URL: wagtail_embedvideos-0.5.11-py3-none-any.whl
  • Upload date:
  • Size: 55.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for wagtail_embedvideos-0.5.11-py3-none-any.whl
Algorithm Hash digest
SHA256 13ce4fb7ead62f11201dc050690ded0473b76fb8bbc0fbfe1c5f387e429dc543
MD5 b79a4082447b8d9ef438376bb542d899
BLAKE2b-256 b0de2180f01102c8497112417d1b88bc32928fab99d9865c7958f2e8cb6e3e81

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page