Skip to content

5.3.0

Choose a tag to compare

@juanmitaboada juanmitaboada released this 07 Oct 10:59
· 34 commits to master since this release
v5.3.0
1466022
  • codenerix.debug.show_toolbar, now the SHOW_TOOLBAR_CALLBACK in DEBUG_TOOLBAR_DEFAULT_CONFIG. Visibility is driven by the new optional settings DEBUG_TOOLBAR_ALLOWED_IPS (list of client IPs; "0.0.0.0" means any) and DEBUG_TOOLBAR_REQUIRE_SUPERUSER (defaults to not DEBUG). Both are read per request, so they may be defined anywhere in the settings module. When DEBUG_TOOLBAR_ALLOWED_IPS is not defined, upstream's default (DEBUG and INTERNAL_IPS) applies unchanged. The project must assign DEBUG_TOOLBAR_CONFIG = DEBUG_TOOLBAR_DEFAULT_CONFIG (or set SHOW_TOOLBAR_CALLBACK to "codenerix.debug.show_toolbar" itself), and do it under the same condition autoload() uses to install the toolbar; otherwise upstream's callback stays in charge and none of this applies. - autoload(..., DEBUG_TOOLBAR_PRODUCTION=False): opt-in to install the toolbar with DEBUG=False. Without it, the toolbar is still only installed when DEBUG is true. - System check codenerix.E001: rejects a DEBUG_TOOLBAR_ALLOWED_IPS that is not a list/tuple/set (a bare string would degrade into a substring match) and the combination "0.0.0.0" + DEBUG=False + DEBUG_TOOLBAR_REQUIRE_SUPERUSER=False, which would make the toolbar public. show_toolbar fails closed on both, since system checks do not run under uWSGI/WSGI.

  • autourl() mounts __debug__/ when DEBUG_TOOLBAR is set and debug_toolbar is in INSTALLED_APPS, instead of requiring DEBUG. It now follows what autoload() actually installed.