New Wagtail Course! 🥳 The Ultimate Wagtail Developers Course

Tutorial Wagtail Version: 2.x

Installing Wagtail using Venv

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.

Sometimes the best way to get started is the easiest. When you're just getting started with a Python project, it can take time to setup Docker, or a specialized virtual environment.

In this tutorial we'll create a brand new virtual environment using Pythons venv command.

It's so easy, it can be done in one simple command.

Creating a new virtual environment with venv

This command is about 100x easier than using Docker. And in my opinion it's just as easy as setting up a project with Pipenv or virtualenv. To create a new venv simply type this command in your project directory:

python -m venv .venv/

Activating your venv

Activating your venv is the same as using virtualenv, if you've ever used that. It's as easy as:

source .venv/bin/activate

Getting out of your venv

Once you're inside of your venv you cant type deactivate to get out of it.

Deleting your venv

Sometimes we break something or make a mistake (like typos!) and we want to start over. All we need to do is delete the .venv/ directory. You can either open the project folder and delete the .venv/ folder, or cd to your project form your favourite command line program and type rm -rf .venv/ (but please be careful when using rm!)

—

This lesson is a clip from the Wagtail for Beginners course where you'll learn how to create a brand new Wagtail website from scratch. It includes pretty much all the code you'll use on every single Wagtail website including a custom menu, Orderables, and even caching mechanisms. (and feel free to steal the source code!). You'll also learn how to setup your Wagtail website on a production server using Ubuntu.

Wagtail for Beginners Cover Image https://learnwagtail.com/wagtail-for-beginners/

Related tutorials

Installing Django Debug Toolbar

Posted on

Learn how to add one of the most useful Django debugging tools into your new Wagtail project. We'll go through the installation docs, learn how base.py, dev.py and production.py work together, and how to install Django Debug Toolbar.

View lesson, Installing Django Debug Toolbar

Registering Snippets using Django Models

Posted on

Snippets are Wagtails way of re-using existing data. For example, being able to select a Blog Author (or multiple authors) instead of having to add a name, image and website for every blog author in every blog post you make; instead you can simply fill out a form once, and re-use the final data with a couple of clicks.

View lesson, Registering Snippets using Django Models

Registering Snippets (Blog Category) using Checkboxes

Posted on

In this tutorial we'll be learning how to register another Wagtail Snippet, but instead of using an Orderable and a SnippetChooserPanel (like the previous lesson) we're going to use a ParentalManyToManyField and a form widget to create Checkboxes in the Wagtail Admin.

View lesson, Registering Snippets (Blog Category) using Checkboxes

How to Install Wagtail Using Pipenv (in less than 6 minutes)

Posted on

Lots of Python developers use Pipenv to setup projects and separate their dependencies from their local machine. In this video we'll install Wagtail from scratch. (Step by step instructions are inside

View lesson, How to Install Wagtail Using Pipenv (in less than 6 minutes)

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