New Wagtail Course! 🥳 The Ultimate Wagtail Developers Course

Tutorial Wagtail Version: 2.x

Enabling Wagtails Styleguide

If you're interested in changing the styling in the /admin/ area of your Wagtail CMS website, or if you're simply looking for a list of Wagtail Icons, the styleguide is where you should be looking. In this tutorial we'll enable the styleguide and look at how some CSS styles are being applied.

Whether you're looking for icons to use in your ModelAdmins or StreamField, or looking for styles to overwrite, or simply interested in seeing what styles are used in the Wagtail's admin area, the styleguide is what you're looking for.

This is one of the easiest features in Wagtail to enable. Simply write one line of code, and it'll do everything else for you. Take a look a the code below.

The entire git commit can be found here https://github.com/CodingForEverybody/learn-wagtail/commit/9226104eb57a12877baf6b0ece1a182c7c378fbb but truthfully, it's just one line of code that we added to dev.py. Only with Wagtail CMS can you enable something so quickly :P

Related tutorials

Using Wagtails save() method to remove template caching

Posted on

In the previous lesson we discovered how to save sections of a template and reduce the number of queries on any given page. But to delete the cache so that Wagtail CMS could update the page was a very manual task. In this tutorial, we'll learn how to use Wagtails save() method to delete specific template fragment cache from our site.

View lesson, Using Wagtails save() method to remove template caching

How to Register a Django Model with Wagtails ModelAdmin

Posted on

In the land of Django and Wagtail, sometimes you need custom Django Models but Wagtail doesn't let you edit these models by default. And personally, I don't believe in giving a client 2 admin dashboards to operate in. So let's add a custom Django Model to our Wagtail website using a Wagtail ModelAdmin.

View lesson, How to Register a Django Model with Wagtails ModelAdmin

How to Enable the v2 API to Create a Headless CMS

Posted on

Wagtail comes with a lot of really powerful features. Many features are not enabled by default as to keep your site running quickly and efficiently. One of those amazing features is the Wagtail v2 API, which can return any page, image, document, orderable and StreamField as a JSON response for your SPA/PWA to consume. We'll enable this by adding just 12 lines of code to our Wagtail CMS website.

View lesson, How to Enable the v2 API to Create a Headless CMS

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!

View lesson, Headless CMS: Custom Wagtail Image Serializer

The Ultimate Wagtail Developers Course

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.

Ultimate Wagtail Developers Course Logo