Tutorial Wagtail Version: 2.x
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.
This is second tutorial about template fragment caching. If you're new to template caching, please check out the first tutorial to get an idea of what template caching is and how to apply it.
In the previous tutorial we added template caching to our website, and I demonstrated how it's good and bad. And deleting template cache was a manual job, which is no way to live your life.
In this tutorial we'll learn how to automatically remove template fragment caching when you save a Wagtail Page.
If you'd like to see the entire Git Commit, with all 12 lines that were added, here's the link: https://github.com/CodingForEverybody/learn-wagtail/commit/f9423929d815f8c3c960b849a57b606728aace0c
And if you want to view the entire repo with all the course progress so far, all the learnwagtail.com video tutorial code is available at https://github.com/CodingForEverybody/learn-wagtail
How to Add Template Caching
Posted on
Wagtail is a fast CMS. It's built largely for performance, which is why a lot of beautiful features are not enabled by default. In this lesson we're going to take a look at database queries and template fragment caching to speed up our load times (page performance).
Enabling Wagtails Styleguide
Posted on
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.
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.
Installing Wagtail using Venv
Posted on
This is a clip from the Wagtail for Beginners course. Learn how to setup a brand new Wagtail project using pure Python. No Docker, no virtualenv, no Pipenv, nothing fancy. We'll use Pythons built in venv command.
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.