Skip to content

Backend: Development Features

zL2noob edited this page May 2, 2024 · 1 revision

Development enviroment

To get autocompletion for external packages without running your editor inside the docker container you may have to install the packages located in requirements.txt.

Installation of dependencies for code completion

Linux

First initialize a virtual environment.

# Initialize virtual environment
$ python -m venv venv

# Activate the virtual environment
$ source ./venv/bin/activate

# Install the requirements
$ pip install -r requirements.txt

Testing

To run all tests, run:

python3 manage.py test

in a server container terminal (see Local Startup for how to access one).

To run tests in a specific module, for example the mail module, run:

python3 manage.py test bittan.tests.mail

Of course, mail may be replaced with any module found in /bittan/tests/.

Logs

Logs are found the files backend/bittan/log-info.log and backend/bittan/log-warning.log. They contain log messages of severity INFO and WARNING or higher respectively, as defined by Django's integration with the Python logging module. Thus, log-info contains everything that log-warning contains but not the other way around.

Clone this wiki locally