Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You may wish to install a tool such as pgAdmin to easily make database changes.

Info

We have no info on setting up an environment for Windows yet, you should get by with WSL

MacOS

Assuming you use Homebrew, run the following:

...

Many package managers will start PostgreSQL automatically. Typically, you can run systemctl start postgresql to ensure this. Refer to your distribution's documentation for further information.

Creating the database

Once PostgreSQL is finished downloading, you will need to create the database.

If you installed via a package manager on either macOS or a linux based distribution, open the command line of your choice and run the below. It should be noted that in some cases you may need to run these commands with sudo.

Code prettify
languageDetect language
psql -c "CREATE USER username WITH PASSWORD 'password';"

psql -c "CREATE DATABASE database_name OWNER owner;"

On Windows you will need to run the above, but first you will need to find the psql binary installed to your system. In the above commands, replace psql with the path to your psql binary.

After all the above is complete, you will need to edit config-example.py with your database credentials and name. Then you will need to rename config-example.py to config.py.

Code prettify
languagePython
db_url = "postgresql://username:password@localhost/database_name"

Database setup is complete!

Setting up the development environment

...