3 Creating a blog

 

This chapter covers

  • Creating a new Wagtail app
  • Creating new Wagtail page types from scratch
  • Exploring the page tree
  • Creating a global navigation menu

Before I start showing you how to create a functional e-commerce system using Wagtail, I’d like to go over some of the basics. Until now I had you customize the home page model and template, but you didn’t create any new Wagtail Page types. In about 99% of cases you will be working with websites that have different page types. That’s because certain pages require different functionality, and in most cases they need the same basic functionality from Wagtail but will act differently from the home page. In other words, no two page types are the same.

It’s usually a good idea to create a blog on most websites to keep your users up to date on new events, products, or general news. Blogs help your users see that you are an active business. But more than anything, a blog can help you market your products. After all, you’ll be creating an e-commerce website and need some marketing tools. This chapter doesn’t focus on the business aspect of your website, but it helps to set the underlying foundation for all future Wagtail websites and it just happens to give you another tool in your website tool belt.

3.1 Creating a new Wagtail app

3.2 Creating custom Page types

3.3 Enforcing a strict page tree structure

3.4 Adding Wagtail StreamFields

3.5 Adding blog posts to Page context

3.6 Creating a global navigation

3.7 Learning by experimenting

3.8 Summary