Wagtail blog part#1

Pawel Grajewski
2 min readFeb 27, 2022
wagtail Blog Tutorial

Welcome to our Wagtail Blog tutorial. In this article, we will discuss how to prepare our project and run it for the first time. The content will be similar to the dosc.wagtail.org tutorial which introduces into wagtail world. Wagtail documentation is a wonderful place to get info about this CMS and how it works. Have also many useful tricks for beginners and solutions for common problems.

We will extend it for a few new things and make it look more like a normal site using the template from https://startbootstrap.com/. This will learn us how to use wagtail templates and filters.

Wagtail is very powerful but for newbies can be challenging to make the first steps. Thinking about future creating reusable components and templates can be worth it.

Let's start from the beginning and remained a few things which we should know before starting creating the wagtail project. The most important thing is basic knowledge about the python environment. How to install it. What it is and how to use it. The second information is to have basic knowledge about what is a virtual environment and how to use it. The last thing is to be familiar with writing python, javascript, and CSS code. This ability will help us to not be frustrating in beginning but without this knowledge, we can try maybe you have a wagtail in your blood and everything will go smooth and easy.

The first command will be to create a virtual environment:

$ python -m venv .venv/

The second one will be to activate the environment:

$ source .venv/bin/activate

This is a version for Windows users:

$ source .venv/Scripts/activate

Lastly, we will install wagtail as a dependency:

$ pip install wagtail

When all is installed let’s create our project:

$ wagtail start mysite .

When the project is created let’s create a basic database structure:

$ python manage.py migrate

And run a local server with the command:

$ python manage.py createsuperuser

All this steps you can see in this video:

Thanks for part#1 and see you in the next article.

--

--