Fixed #19164 -- Diffsettings commands fails to force load settings #461

wants to merge 1 commit into


None yet
2 participants

Related to ticket #18545, it was added an argument to the setup method of the LazySettings object.

The diffsettings command call settings._setup() to force load all settings and then show to the user.

$ python diffsettings --traceback
Traceback (most recent call last):
  File "/home/mariocesar/Proyectos/Crowddeals/env/local/lib/python2.7/site-packages/django/core/management/", line 222, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/home/mariocesar/Proyectos/Crowddeals/env/local/lib/python2.7/site-packages/django/core/management/", line 252, in execute
    output = self.handle(*args, **options)
  File "/home/mariocesar/Proyectos/Crowddeals/env/local/lib/python2.7/site-packages/django/core/management/", line 382, in handle
    return self.handle_noargs(**options)
  File "/home/mariocesar/Proyectos/Crowddeals/env/local/lib/python2.7/site-packages/django/core/management/commands/", line 19, in handle_noargs
TypeError: _setup() takes exactly 2 arguments (1 given)

I fix this by making the name argument optional

class LazySettings(LazyObject):
    A lazy proxy for either global Django settings or a custom settings object.
    The user can manually configure settings prior to using them. Otherwise,
    Django uses the settings module pointed to by DJANGO_SETTINGS_MODULE.
    def _setup(self, name=None):


carljm commented Oct 23, 2012

Thanks for the pull request! I committed a version of this as 3541a10

@carljm carljm closed this Oct 23, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment