Skip to content
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
18 changes: 11 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,22 @@ jobs:

strategy:
matrix:
python: ["3.8", "3.9", "3.10", "3.11"]
django: ["3.2", "4.0", "4.1", "4.2"]
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
django: ["4.2", "5.2", "6.0"]
exclude:
- python: "3.13"
django: "4.2"
- python: "3.14"
django: "4.2"
- python: "3.10"
django: "6.0"
- python: "3.11"
django: "3.2"
- python: "3.11"
django: "4.0"
django: "6.0"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
- name: Install package
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ django-zen-queries

Gives you control over which parts of your code are allowed to run queries, and which aren't.

Tested against Django 3.2, 4.0, 4.1 and 4.2 on Python 3.8, 3.9, 3.10 and 3.11.
Tested against Django 4.2, 5.2 and 6.0 on Python 3.10, 3.11, 3.12, 3.13 and 3.14.

#### Testimonial

Expand Down Expand Up @@ -131,7 +131,7 @@ def validate_xyz(pizzas):
...
```

This also works with Django's [`method_decorator`](https://docs.djangoproject.com/en/3.0/topics/class-based-views/intro/#decorating-the-class) utility.
This also works with Django's [`method_decorator`](https://docs.djangoproject.com/en/5.2/topics/class-based-views/intro/#decorating-the-class) utility.

### Extra tools

Expand Down Expand Up @@ -191,11 +191,11 @@ There are {{ pizzas.count }} pizzas.

### Permissions gotcha

Accessing permissions in your templates (via the `{{ perms }}` template variable) can be a source of queries at template-render time. Fortunately, Django's permission checks are [cached by the `ModelBackend`](https://docs.djangoproject.com/en/2.2/topics/auth/default/#permission-caching), which can be pre-populated by calling `request.user.get_all_permissions()` in the view, before rendering the template.
Accessing permissions in your templates (via the `{{ perms }}` template variable) can be a source of queries at template-render time. Fortunately, Django's permission checks are [cached by the `ModelBackend`](https://docs.djangoproject.com/en/5.2/topics/auth/default/#permission-caching), which can be pre-populated by calling `request.user.get_all_permissions()` in the view, before rendering the template.

### How does it work?

It uses the [Database Instrumentation](https://docs.djangoproject.com/en/2.2/topics/db/instrumentation/) features introduced in Django 2.0.
It uses the [Database Instrumentation](https://docs.djangoproject.com/en/5.2/topics/db/instrumentation/) features introduced in Django 2.0.

### Installation

Expand Down
8 changes: 4 additions & 4 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
black==22.6.0
djangorestframework==3.13.1
flake8==4.0.1
isort==5.10.1
black==26.1.0
djangorestframework==3.16.1
flake8==7.3.0
isort==8.0.0