(This is a project realised for our University, it will not be maintained after and it should not be used outside of testing)
Palto is a project to check students attendances at their school classes. It allows teachers to create sessions containing students that should be present. They can then scan their student card with the NFC technology and they will be automatically marked as present to this session.
- Install
python >= 3.11
- Create a virtual environment with
python -m venv ./.venv/
. The next steps will be inside it. - Install the dependencies with
python -m pip install -r ./requirements.txt
. - Modify the
Palto/settings.py
file to setup your database and other settings. - Make the migrations with
python ./manage.py makemigrations
. - Apply the migrations to the database with
python ./manage.py migrate
. - Run the program by with
python ./manage.py runserver
.
- Start a terminal in the directory of the project.
- Run
docker build
. - Change the environment variables to match your configuration.
By default, the server is launch in production mode.
This disables the automatic static files serving since they are considered as being already served by nginx or apache.
You can start with the environment variable DEBUG=true
to start it in development mode.
You should set a django secret key manually in the DJANGO_SECRET_KEY
environment variable. You can get one by
opening a python interpreter with django and calling the function django.core.management.utils.get_random_secret_key()
.
The database used by default is sqlite
. This is not recommended to keep it since it won't be saved by docker after
a restart if no volume are set, and it is considered a slow database engine. Using a postgres
database is recommended.
You can find more details about the database in the configuration settings.py
.