New Wagtail Course! 🥳 The Ultimate Wagtail Developers Course

Tutorial Wagtail Version: 2.x

Getting Started With Your First Home Page

Learn how to work with Wagtails default Home Page class, and how to extend it with a simple Django model field. WE'll also explore a custom template and how to extend it.

The Final Code

``` {# templates/home/home_page.html #} {% block content %} {{ self.banner_title }} {% endblock %} ```
``` # home/models.py from django.db import models from wagtail.core.models import Page from wagtail.admin.edit_handlers import FieldPanel class HomePage(Page): """Home page model.""" templates = "home/home_page.html" max_count = 1 banner_title = models.CharField(max_length=100, blank=False, null=True) content_panels = Page.content_panels + [ FieldPanel("banner_title") ] class Meta: verbose_name = "Home Page" verbose_name_plural = "Home Pages" ```

Related tutorials

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.

View lesson, Getting Child Page Properties From a Subclassed Page

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.

View lesson, Installing Wagtail using Venv

How to Add a Basic StreamField to your Wagtail CMS Page

Posted on

In this lesson we are going to learn how to add a basic StreamField to a a generic Wagtail CMS Page. We'll create a new app from scratch, and this StreamField will have a title and text (using StructBlock), a custom template, and it will lay the foundation for the next lesson which covers inheriting RichTextBlock and modifying the features it can have.

View lesson, How to Add a Basic StreamField to your Wagtail CMS Page

How to Add a RichText StreamField to your Wagtail CMS Page

Posted on

In this video we are going to learn how to create a RichTextBlock StreamField, and then we're going to duplicate that StreamField and limit the number of features the editor gives us.

View lesson, How to Add a RichText StreamField to your Wagtail CMS Page

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