-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[feat] Database Option #1559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat] Database Option #1559
Conversation
1 similar comment
parser.add_argument( | ||
'--show-secrets', | ||
default=DEFAULT_SECRETS, | ||
dest='show secrets', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please do not use spaces, use underscores.
@staticmethod | ||
def get_defaults(options): | ||
a_options = [ | ||
options.get('show secrets', DEFAULT_SECRETS), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please do not use spaces, use underscores.
@staticmethod | ||
def safe_settings(): | ||
try: | ||
return SafeExceptionReporterFilter().get_safe_settings() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If django < 3.0 does not have this class then the import above will already have failed and this code is meaningless.
Either the comment below is wrong or we should catch ImportError
during importing.
FYI: This entire code can be replaced to function at startup time which seem to be preferred to this way if it served no additional function.
@@ -47,11 +47,17 @@ def add_arguments(self, parser): | |||
type=bool, | |||
help="Specifies if should be revealed the value of secrets", | |||
) | |||
parser.add_argument( | |||
"--database", | |||
dest="show database", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no spaces, just underscores :-)
I guess I don't understand what purpose this PR serves... |
Feature requested in the #1467. I added a new option in
print_settings.py
to show the current database. But we need to approve and merge the #1553 PR, because I made some refactoring in this file through this PR