Create a virtual environment:
python3 -m venv venv
Activate the environment:
. venv/bin/activate
Now you may either use pip
directly to install the dependencies, or
you can install pip-tools
. The latter is recommended.
pip install -r requirements.txt
pip-tools can keep your virtual
environment in sync with the requirements.txt
file, as well as compiling a
new requirements.txt
when adding/removing a dependency in requirements.in
.
pip install pip-tools
pip-compile # only necessary when adding/removing a dependency
pip-sync
flask initdb
flask populatetestdb
This will create the database and populate it with some mock data. Posts, events and pages are generated from some paragraphs of "lorem ipsum" and a bit of random "logic".
FLASK_DEBUG=1 flask run
flask createadmin
You will be prompted for a username and password.
From the root directory, run
python3 -m migrations.<name_of_migration>
As it is run as a module, do not include the file extension (.py
).