Skip to content

Releases: torchbox/wagtailmedia

v0.12 - Better comparison and API

01 Nov 10:10
08e06e6
Compare
Choose a tag to compare

This release adds an API viewset and serializer for media items.

API

To expose media items in the API, you can follow the Wagtail documentation guide for API configuration with wagtailmedia specifics:

# api.py
from wagtail.api.v2.router import WagtailAPIRouter
from wagtailmedia.api.views import MediaAPIViewSet


# Register the router
api_router = WagtailAPIRouter("wagtailapi")
# add any other enpoints you need, plus the wagtailmedia one

Comparison

Media field (that is, ForeignKey to media) and media chooser blocks are rendered in the revision comparison

Screenshot 2022-10-25 at 18 54 21

What's Changed

New Contributors

Full Changelog: v0.11.1...v0.12.0

v0.11.1 - moar Wagtail 4 (tidy ups)

07 Oct 12:10
f150606
Compare
Choose a tag to compare
  • Further Wagtail 4 UI updates from @thibaudcolas in #176
  • Include non-field errors in the modal forms by @niarferuto in #174
  • Styling tidy ups
  • ⚠️ made the Django 3.2+ requirement more explicit

Full Changelog: v0.11.0...v0.11.1

v0.11 - Wagtail 4.0 support

02 Sep 13:35
Compare
Choose a tag to compare

This release brings polish and tidy up compatible with the Wagtail 4.0 release.

What's Changed

New Contributors

Full Changelog: v0.10.1...v0.11.0

v0.10.1 - like 0.10, but without template errors

20 Jun 10:13
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.10.0...v0.10.1

v0.10 - Wagtail 2.15 to 3.0

10 Jun 16:32
Compare
Choose a tag to compare

What's Changed

  • Fixes for wagtail 3.x by @zerolab in #154
  • Fixed typo in CHANGELOG link by @jsma in #158
  • Update French translations by @hoccau in #159
  • [Wagtail mainline] Conditionally use use_json_field in test app StreamField definition by @zerolab in #156
  • Allow cancelling CI for same branch, update codecov config by @zerolab in #162
  • Fix chooser tabs compatibility with Wagtail 3.0, and drop Wagtail < 2.15 by @zerolab in #161

New Contributors

Full Changelog: v0.9.0...v0.10.0

v0.9.0 - keeping up to date with Wagtail

22 Feb 11:16
Compare
Choose a tag to compare

This release is compatible with Wagtail 2.15 and 2.16 as well as fixes an issue for projects that sublcassed BaseMediaForm (#148)

What's Changed

New Contributors

Full Changelog: v0.8.0...v0.9.0

v0.8.0 - You Give Me.. Choosers!

11 Sep 10:41
Compare
Choose a tag to compare

This relase brings a ton of improvements.

To start with, wagtailmedia is now 100% compatible with Wagtail 2.13+ when used in StreamFields. The media chooser now uses the correct media upload forms and should pick up any customisations you make.

Settings

We moved to a single WAGTAILMEDIA setting dictionary and introduced allowed lists for the audio and video extension. Support for the old WAGTAILMEDIA_MEDIA_MODEL and WAGTAILMEDIA_MEDIA_FORM_BASE settings will be removed in the release after next (v0.10.0)

# settings.py

WAGTAILMEDIA = {
    "MEDIA_MODEL": "",  # string, dotted-notation. Defaults to "wagtailmedia.Media"
    "MEDIA_FORM_BASE": "",   # strind, dotted-notation. Defaults to an empty string
    "AUDIO_EXTENSIONS": [],  # list of extensions
    "VIDEO_EXTENSIONS": [],  # list of extensions
}

New chooser types

  • MediaChooserPanel accepts the media_type keyword argument (kwarg) to limit the types of media that can be chosen or uploaded. At the moment only "audio" (MediaChooserPanel(media_type="audio")) and "video" (MediaChooserPanel(media_type="audio")) are supported, and any other type will make the chooser behave as if it did not get any kwarg.
  • AudioChooserBlock and VideoChooserBlock can be used in StreamField
# ...
from wagtailmedia.blocks import AudioChooserBlock, VideoChooserBlock


class BlogPage(Page):
    # ...

    body = StreamField([
        # ... other block definitions
        ('audio', AudioChooserBlock(icon='media')),
        ('video', VideoChooserBlock(icon='media')),
    ])

Changelog

  • Updated test targets to include Wagtail 2.14
  • Changed the chooser uploader forms to use correctly instantiated forms (#135)
  • Fixed the media chooser block compatibility with Wagtail 2.13 (#136. Thanks @efes)
  • Added tag-based filters (#132. Thanks @th3hamm0r)
  • Added default_auto_field for Django 3.2+ (#134. Thanks @hyperstown)
  • Refactored project structure and updated tooling (#137)
  • Added specialized StreamField blocks and support media type filter in MediaChooserPanel (#139)
  • Added file extension validation (#140)
  • Switched to a unified WAGTAILMEDIA setting dictionary (#140)

v0.7.1 - The data-tab-nav "incident"

12 Jun 22:33
Compare
Choose a tag to compare

This patch release fixes a small, but annoying Wagtail 2.13 incompatibility which made it impossible to use the tabbed interface in the chooser modal. Between 2.12 and 2.13, Wagtail tweaked a bit how it handles tabs in order to accomodate new features, as well as tidy up old code. all we needed was a good old data-tab-nav for the chooser tabs.

Thank you @jams2 for the sleuthing and PR 🕵️‍♂️

v0.7.0 – Optional durations, Chinese translations

06 Nov 15:34
Compare
Choose a tag to compare

[0.7.0] - 2020-11-06

  • Made the duration field optional, and altered it from PositiveIntegerField to FloatField. If you rely on integer output of duration in templates use {{ media.duration|floatformat:"0" }} instead of {{ media.duration }} to restore the previous behavior (#100, #106, #108, #110). Thanks to @thenewguy!
  • Fixed deprecation warnings with Django 3.0 (#94, #109).
  • Excluded tests folder from published package’s sdist (#107)).
  • Added Chinese (China) translations (#114). Thanks to @Dannykey and @BrianXu20
  • Removed declared support for Python 3.5, Wagtail 2.8, Wagtail 2.9 (#116)
  • Added declared support for Python 3.9, Wagtail 2.11, Django 3.1 (#116)

v0.6.0 – Chooser uploads!

14 Aug 14:43
8dce6b6
Compare
Choose a tag to compare

[0.6.0] - 2020-08-14

  • Added filtering of media files by user permission in chooser panel (#25). Thanks to @snj
  • Added French translations (#61). Thanks to @jeromelebleu.
  • Add {% block action %} template block to allow overriding of form action in add.html template (#102). Thanks to @thenewguy
  • Fix expected NotImplementedError in Wagtail 1.6+ (#104). Thanks to @chosak and @Scotchester.
  • Add support for uploading media files via the media chooser, just like images and documents (#22, #97). Thanks to @teixas! 🎉

upload