Releases: torchbox/wagtailmedia
v0.12 - Better comparison and API
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
What's Changed
- Update UI for Wagtail 4 by @thibaudcolas in #176
- Russian translation by @vl-tk in #177
- Update various GitHub action versions by @zerolab in #182
- Fix Wagtail 4.1 compatibility (usage counts) by @zerolab in #181
- Add API viewset and serializer by @zerolab and @hallpower in #185
- Add field and block comparison by @zerolab in #184
- Test against Python 3.11 by @zerolab in #187
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #186
New Contributors
- @vl-tk made their first contribution in #177
- @hallpower made their first contribution in #185
Full Changelog: v0.11.1...v0.12.0
v0.11.1 - moar Wagtail 4 (tidy ups)
- 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
This release brings polish and tidy up compatible with the Wagtail 4.0 release.
What's Changed
- Update tests to match Wagtail 4.0 markup by @gasman in #168
- Fix dependancy resolution for
MediaChooserPanel
scripts by @jhnbkr in #170 - Tidy ups for Wagtail 4 by @zerolab in #169, and real-world testing by @th3hamm0r 🙌
- Update german translations by @th3hamm0r in #171
- Show edit button when item is chosen, refs #167 by @th3hamm0r in #172
New Contributors
Full Changelog: v0.10.1...v0.11.0
v0.10.1 - like 0.10, but without template errors
What's Changed
- Fix comment in template by @th3hamm0r in #163
New Contributors
- @th3hamm0r made their first contribution in #163
Full Changelog: v0.10.0...v0.10.1
v0.10 - Wagtail 2.15 to 3.0
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
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
- Fix tests for 2.15rc1 by @gasman in #142
- Fix tests when run against main / 2.15rc1 on Postgres by @gasman in #143
- Tidy up tox targets by @zerolab in #144
- Translations for Ukrainian language by @yuriifabirovskyi in #145
- Removed module level call to
get_media_base_form()
by @jsma in #148 - Prep for Wagtail 216 by @zerolab in #151
New Contributors
- @gasman made their first contribution in #142
- @yuriifabirovskyi made their first contribution in #145
- @jsma made their first contribution in #148
Full Changelog: v0.8.0...v0.9.0
v0.8.0 - You Give Me.. Choosers!
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 themedia_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
andVideoChooserBlock
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"
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
[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!
[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 inadd.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! 🎉