5 Creating a Wagtail store

 

This chapter covers

  • Setting up a brand new app
  • Using Wagtail Orderables
  • Adding more advanced StreamField blocks
  • Using Wagtail’s built-in search

Welcome to what I like to call “the good stuff.” In this chapter I will show you how to use more advanced features such as Orderables and customized StreamField blocks. Don’t worry if those topics sound daunting right now. By the end of this chapter you’ll be familiar with how it all works. I’ll also show you how to use Wagtail’s built-in search capabilities to create a global search function so people can find your products. Some of this is repeated code for you, if you created the blog with me prior to this chapter. But I like to make sure everyone is on the same page without making assumptions about whether you started this book from the very beginning.

At first I will go over creating a new app called products and together you and I will create two new page types: a ProductIndexPage and a ProductPage. You might have noticed, already, that this is following the same pattern from the blog. This is a standard pattern across most Wagtail websites I have seen, where the app's primary page is called an index page (or sometimes a listing page).

5.1 Creating the Products app

 
 
 

5.2 Orderables

 
 
 

5.3 StreamField Blocks

 
 
 

5.4 Adding product search

 
 

5.5 Summary

 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest