django/django — pull request #461 by mariocesar (2012-10-22 22:43:58+00:00)
Title: Fixed #19164 -- Diffsettings commands fails to force load settings

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 manage.py diffsettings --traceback
Traceback (most recent call last):
File "/home/mariocesar/Proyectos/Crowddeals/env/local/lib/python2.7/site-packages/django/core/management/base.py", 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/base.py", line 252, in execute
output = self.handle(*args, **options)
File "/home/mariocesar/Proyectos/Crowddeals/env/local/lib/python2.7/site-packages/django/core/management/base.py", 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/diffsettings.py", line 19, in handle_noargs
settings._setup()
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):

...
```