harbor run -t openthoughts/tasktrove-exp-rpt-issue-issue-0908harbor download openthoughts/tasktrove-exp-rpt-issue-issue-0908diffsettings currently compares the current settings against Django's built-in defaults../manage.py diffsettings --default=settings.base should compare the current settings to the given module rather than to Django’s defaults.# app/django/core/management/commands/diffsettings.py (before)
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument(
'--all', action='store_true', dest='all', default=False,
help='Display all settings, regardless of their value. Default values are prefixed by "###".',
)
def handle(self, **options):
# Inspired by Postfix's "postconf -n".
from django.conf import settings, global_settings
# Because settings are imported lazily, we need to explicitly load them.
settings._setup()
user_settings = module_to_dict(settings._wrapped)
default_settings = module_to_dict(global_settings)
output = []
for key in sorted(user_settings):
# ... rest of the implementation ...
pass
Notes:
If you want, I can generate a ready-to-run patch in the app/ directory or provide further scaffolding tests to validate the new behavior.