Created
January 11, 2020 18:59
-
-
Save AlTosterino/1419ea240afde561718e9ac9931eec27 to your computer and use it in GitHub Desktop.
Hiding settings variables in Django debug page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
from django.views import debug | |
HIDDEN_DEFAULT = 'API|TOKEN|KEY|SECRET|PASS|' | |
debug.HIDDEN_SETTINGS = re.compile( | |
f'{HIDDEN_DEFAULT}ADDED_NAME|ANOTHER_ADDED_NAME', | |
flags=re.IGNORECASE) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment