Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bashu/wagtail-embedvideos
🎬 Integration of django-embed-video for Wagtail CMS
https://github.com/bashu/wagtail-embedvideos
django-embed-video wagtail
Last synced: about 1 month ago
JSON representation
🎬 Integration of django-embed-video for Wagtail CMS
- Host: GitHub
- URL: https://github.com/bashu/wagtail-embedvideos
- Owner: bashu
- License: bsd-3-clause
- Created: 2015-05-20T16:48:45.000Z (over 9 years ago)
- Default Branch: develop
- Last Pushed: 2022-04-20T07:52:38.000Z (almost 3 years ago)
- Last Synced: 2024-12-13T19:27:24.513Z (about 2 months ago)
- Topics: django-embed-video, wagtail
- Language: Python
- Homepage:
- Size: 555 KB
- Stars: 55
- Watchers: 8
- Forks: 34
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
- License: LICENSE
Awesome Lists containing this project
README
wagtail-embedvideos
===================.. image:: https://img.shields.io/pypi/v/wagtail-embedvideos.svg
:target: https://pypi.python.org/pypi/wagtail-embedvideos/.. image:: https://img.shields.io/pypi/dm/wagtail-embedvideos.svg
:target: https://pypi.python.org/pypi/wagtail-embedvideos/.. image:: https://img.shields.io/github/license/bashu/wagtail-embedvideos.svg
:target: https://pypi.python.org/pypi/wagtail-embedvideos/.. image:: https://app.travis-ci.com/bashu/wagtail-embedvideos.svg?branch=develop
:target: https://app.travis-ci.com/bashu/wagtail-embedvideosSimple 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.9Maintained by `Basil Shubin `_, and some great
`contributors `_... raw:: html
Installation
------------First install the module, preferably in a virtual environment. It can be installed from PyPI:
.. code-block:: shell
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:
.. code-block:: python
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``.
.. code-block:: python
# 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 EmbedVideoChooserPanelclass 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:
.. code-block:: html+django
{% 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.
.. _django-embed-video: https://github.com/jazzband/django-embed-video/