Version 7 breaking changes notes

This commit is contained in:
Aleksi Häkli 2024-10-02 20:30:44 +03:00 committed by GitHub
parent b54019fa0f
commit 4e89d72b92
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -75,6 +75,14 @@ Many people have different configurations for their development and production e
and running the application with misconfigured settings can prevent security features from working.
Version 7 breaking changes and upgrading from django-axes version 6
-------------------------------------------------------------------
If you use ``settings.AXES_COOLOFF_TIME`` for configuring a callable that returns the cooloff time, it needs to accept at minimum a ``request`` argument of type ``HttpRequest`` from version 7 onwards. Example: ``AXES_COOLOFF_TIME = lambda request: timedelta(hours=2)`` (new call signature) instead of ``AXES_COOLOFF_TIME = lambda: timedelta(hours=2)`` (old cal signature).
Please see configuration documentation and `jazzband/django-axes#1222 <https://github.com/jazzband/django-axes/pull/1222>`_ for reference.
Version 6 breaking changes and upgrading from django-axes version 5
-------------------------------------------------------------------