Tutorial Wagtail Version: 2.x
If you want to add data custom data (or a function output) to your headless Wagtail API, you can use a @property. In this tutorial I'll show you how easy it can be!
Headless CMS: Custom Wagtail Image Serializer
Posted on
Using Django Rest Framework with Wagtails v2 API, we can customize ANY field the way we want. In this short video, we take a look at creating a new field entirely by overwriting an image, but we also look at serializing (JSONifying) an image field from a ForeignKey inside an Orderable. Don't worry, it's not as crazy as it sounds!
Headless CMS: Exposing Custom Page Fields to the v2 API
Posted on
In the last lesson we enabled Wagtails v2 API but we didn't have access to our custom fields.. yet! In this lesson we'll learn how in just 4 lines of code we can make a custom Wagtail Page field show up in our API. And it only gets easier from there.
Headless CMS: Serialize a Custom Image Chooser Block
Posted on
Learn how to serialize an ImageChooserBlock in your StreamFields to output the image data you're looking for.
Getting Child Page Properties From a Subclassed Page
Posted on
In Wagtail, and just like in Django, you can subclass classes. In this lesson, we're subclassing a Wagtail Page into 2 child pages. But when we query for all the parent classes, we're also given the child classes in the QuerySet, and the data is somewhat inconsistent because child classes can have unique fields that differ from their parents and siblings.
This course covers everything from basic installation to advanced features like custom blocks and API integration, it's perfect for developers looking to enhance their skills with this powerful CMS.