2 Setting up and completing essential tasks

 

This chapter covers

  • Creating a virtual environment
  • Setting up Wagtail as a developer
  • Walking through the Wagtail interface
  • Editing the initial home page
  • Adding custom content to your pages and templates

Before you jump right into coding your new Wagtail website, you need to install Wagtail on your computer. As previously mentioned you’ll need Python 3.7 or newer on your computer. In this book I’ll be using Python 3.10. I won’t be going through Python installation in this book as I’m assuming you have some familiarity with Python already. However, if you don’t have a modern version of Python setup on your computer yet, please do so now before continuing to read this book.

In this chapter you and I will tackle a number of beginner-friendly setup instructions, including creating a new Wagtail CMS project, what the editing interface looks like and making some small code changes to the default home page that Wagtail comes with. If you have never set up a Wagtail website on your computer for local web development, please do not skip this chapter. It’s important to use layers of abstraction to separate this project from your future projects. Also, you’ll learn a little bit, with hands-on experience, about how Wagtail and Django work together so smoothly.

All the code written in this chapter can be found on GitHub in the Chapter 2 pull request located here: https://github.com/KalobTaulien/wagtail-cms-in-action/pull/1/files.

2.1 Installing Wagtail on your computer

2.2 Editing interface introduction

2.3 Wagtails’ page tree

2.4 Editing the home page

2.4.1 Custom text field

2.4.2 Templates

2.4.3 Adding images

2.4.4 Linking to other Wagtail pages

2.5 Specific class data

2.6 Summary