mirror of
https://github.com/Hopiu/django-notifications.git
synced 2026-05-09 05:44:43 +00:00
use older format string for backward compatibility
This commit is contained in:
parent
3ce7e31054
commit
b3fdaeb770
1 changed files with 2 additions and 2 deletions
|
|
@ -82,9 +82,9 @@ def register_notify_callbacks(badge_class='live_notify_badge', # pylint: disabl
|
|||
)
|
||||
|
||||
# add a nonce value to the script tag if one is provided
|
||||
nonce_str = f' nonce="{nonce}"' if nonce is not None else ""
|
||||
nonce_str = ' nonce="{nonce}"'.format(nonce=nonce) if nonce is not None else ""
|
||||
|
||||
script = f'<script type="text/javascript"{nonce_str}>' + definitions
|
||||
script = '<script type="text/javascript"{nonce}>'.format(nonce=nonce_str) + definitions
|
||||
for callback in callbacks.split(','):
|
||||
script += "register_notifier(" + callback + ");"
|
||||
script += "</script>"
|
||||
|
|
|
|||
Loading…
Reference in a new issue