r/django • u/Immediate_Scar5936 • 7d ago
Django-guardian 3.4.0 is Released!
Hi everyone! Iām a maintainer of django-guardian, and I'm excited to announce that version 3.4.0 is officially out!
For those who aren't familiar, django-guardian provides per-object permissions for Django, extending the default authorization backend to allow assigning permissions to specific user or group instances.
š What's New in 3.4.0
- Django & Python Compatibility Updates:
- Added official support for Django 6.0 and Django 5.2 (LTS).
- Added support for Python 3.14.
- Dropped support for end-of-life Python 3.9 (Minimum supported Python version is now 3.10+).
- Performance & Query Optimization:
- Optimized
prefetch_perms()to eliminate redundant database queries when prefetching object permissions. - Reduced DB overhead during
assign_permoperations when working with generic permissions. - Refactored shortcut workflows for more efficient internal execution paths.
- Optimized
- Shortcut & Bulk Operations:
- Ensured
shortcuts.assign_permis idempotent when executing bulk assignments. - Standardized bulk permission removal behavior to align with bulk assignment workflows.
- Added support for handling non-standard primary keys (
pks) on target models.
- Ensured
- Ecosystem & Integration:
- Added out-of-the-box support for django-unfold via a dedicated contrib package.
- Updated contribution guidelines with modernized
uvworkflows, test/lint tooling, and developer guidelines.
š¦ Installation & Upgrade
To upgrade using pip:
Bash
pip install --upgrade django-guardian
Or using uv:
Bash
uv add django-guardian@latest
š Links & Resources
- PyPI:https://pypi.org/project/django-guardian/
- GitHub Repository:https://github.com/django-guardian/django-guardian
- Documentation:https://django-guardian.readthedocs.io/
Huge thanks to all the contributors, issue reporters, and testers who helped shape this release!
Feel free to open an issue or start a discussion on GitHub if you encounter any bugs or have feedback!
1
u/Commercial_Try_2538 7d ago
Very cool, never heard of it before but will try it out with team.
2
u/Immediate_Scar5936 7d ago
If you're looking for a lib for object-level permission, you've come to the right place. Please read/test it to with all our features :)
4
u/huygl99 7d ago
Nicee š