Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Make recent Python versions use recent Django versions #1197

Merged
merged 2 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ repos:
- contextlib2==21.6.0
- croniter==3.0.3
- django-stubs==5.0.4
- django==4.2.16
- django==5.1.1
- importlib-resources==6.4.5
- psycopg2-binary==2.9.9
- psycopg[pool]==3.2.2
- python-dateutil==2.9.0.post0
- sphinx==7.1.2
- sqlalchemy==2.0.34
- sqlalchemy==2.0.35
- typing-extensions==4.12.2
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.5
Expand Down
26 changes: 20 additions & 6 deletions docs/howto/django/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,21 @@

Many Django projects are deployed using PostgreSQL, so using procrastinate in
conjunction with Django would remove the necessity of having another broker to
schedule tasks.
schedule tasks. Procrastinate is designed to play nicely with Django, let's see
how.

## Configuration
## Prerequisites

For each Python version supported by Procrastinate, Procastinate is tested with
the latest Django version supported by that Python version.

As of September 2024, this means Procrastinate is tested with Django 4.2 for
Python 3.8 and 3.9, and Django 5.1 for Python 3.10+. This paragraph is likely
to be outdated in the future, the best way to get up-to-date info is to have a
look at the `tool.poetry.group.django.dependencies` section of the [package
configuration](https://github.com/procrastinate-org/procrastinate/blob/pydjver/pyproject.toml#L79-L83)

## Installation & configuration

To start, install procrastinate with:

Expand All @@ -26,16 +38,18 @@ INSTALLED_APPS = [

## Configuring the app

An app will be configured for you in `procrastinate.contrib.django.app`.
You don't have to configure an app yourself.
A Procrastinate app will be configured for you in
`procrastinate.contrib.django.app`. You don't have to configure an app
yourself.

You can modify the app after its creation, for example to load additional tasks from
blueprints, with:
You can modify the app after its creation, for example to load additional tasks
from blueprints, with:

```python
# settings.py
PROCRASTINATE_ON_APP_READY = "myapp.procrastinate.on_app_ready"
```

```python
# myapp/procrastinate.py
import procrastinate
Expand Down
134 changes: 77 additions & 57 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading