Setup (including Django)
This guide describes the setup of the openaleph-procrastinate
app and mainly the Django integration that can be used to explore job statistics.
Installation
Install openaleph-procrastinate
:
pip:
pip install "openaleph-procrastinate @ git+https://github.com/openaleph/openaleph-procrastinate@main"
poetry:
poetry add "openaleph-procrastinate @ git+https://github.com/openaleph/openaleph-procrastinate@main"
This will include all the required dependencies.
Configuration
The OpenAleph settings are configured via environment vars via pydantic-settings. The Django settings are in the same settings.py
.
For a full list of openaleph-procrastinate
settings, refer to the settings reference.
Database
Set up the environment variable OPENALEPH_PROCRASTINATE_DB_URI
which falls back to OPENALEPH_DB_URI
(default: postgresql:///openaleph
).
The same database will be used for the Django application.
Django settings
More information on Django settings.oy
The full list of settings and their values
Initial database setup
Don't use the procrastinate database setup.
Instead, as procrastinate
is already configured in the Django app, use the Django database migrations:
./manage.py migrate
This will create the Django database tables as well as the procrastinate tables.
Create an admin user to visit the dashboard:
./manage.py createsuperuser
Run the django app
Run the development server:
./manage.py runserver
Visit the admin dashboard at http://localhost:8000/admin/