(context, media=None)
| 82 | |
| 83 | |
| 84 | def nonce_attr(context, media=None): |
| 85 | nonce = context.get(CONTEXT_KEY) |
| 86 | if media: |
| 87 | return media.render(attrs={"nonce": nonce} if nonce is not None else None) |
| 88 | if nonce is None: |
| 89 | return "" |
| 90 | return format_html('nonce="{}"', nonce) |
| 91 | |
| 92 | |
| 93 | def generate_nonce(): |
nothing calls this directly
no test coverage detected