File tree 3 files changed +4
-4
lines changed
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -74,10 +74,10 @@ def csp_nonce(self):
74
74
have a nonce associated with the request. Use the private attribute
75
75
because the lazy object wrapped value can generate a nonce by
76
76
accessing it. This isn't ideal when the toolbar is injecting context
77
- into the response because it may set a nonce that is not used with
77
+ into the response because it may set a nonce not used with
78
78
other assets.
79
79
"""
80
- return getattr (self .request , "_csp_nonce " , None )
80
+ return getattr (self .request , "csp_nonce " , None )
81
81
82
82
def get_panel_by_id (self , panel_id ):
83
83
"""
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ Pending
11
11
or ``async_to_sync `` to allow sync/async compatibility.
12
12
* Make ``require_toolbar `` decorator compatible to async views.
13
13
* Added link to contributing documentation in ``CONTRIBUTING.md ``.
14
- * Rely on django-csp's private attribute for nonce, `` request._csp_nonce ``.
14
+ * Create a CSP nonce property on the toolbar `` Toolbar().csp_nonce ``.
15
15
16
16
5.0.1 (2025-01-13)
17
17
------------------
Original file line number Diff line number Diff line change 25
25
pygments
26
26
selenium>=4.8.0
27
27
sqlparse
28
- django-csp<4
28
+ django-csp
29
29
passenv =
30
30
CI
31
31
COVERAGE_ARGS
You can’t perform that action at this time.
0 commit comments