Skip to content

Folder structure and virtual environment

This section is strictly optional - we hope it will be useful for beginners.

If you already have a virtual environment configured, or don't want to use one, and if you have your project folder structure in place - skip this section.

Project folder

The first step when setting up a new project is to create a folder for the project. We will call our project cmsdemo

mkdir cmsdemo
cd cmsdemo

The resulting folder structure should be: /home/cmsdemo/

Virtual environment

It is strongly recommended to use a virtual environment for the development of your project. Typical steps for creating a virtual environment are listed below.

Note

There are two typical approaches to naming a virtual environment:

  • always the same name, e.g.: venv
  • a name that is different for each project, e.g.: env-cmsdemo

We use the second approach, so that when you activate the virtual environment, you can see its' name in the terminal, and it is harder to confuse it with other virtual environments.

python3 -m venv ./env-cmsdemo/
source ./env-cmsdemo/bin/activate

or on Windows:

python -m venv env-cmsdemo
source env-cmsdemo/Scripts/activate