The first argument here is the global defaults dictionary. Normally,
Django will take your settings file and merge it with
django.conf.global_settings, however, if you are using manual
configuration, you need to make sure that every single default setting
is given a value. This is documented in the manual configuration
section, although we may need to put it in big red flashing lights,
because it gets overlooked.
Manual configuration isn't really designed to make it trivial to specify
your normal settings file and some overrides like you are trying to do
here. One way to do this, though, is to read through your settings file
yourself and put all the options into a dictionary (say settings_dict),
then call
settings.configure(**dict(settings_dict, DEBUG=True))
Alternatively, create a file that combines your settings with
global_settings and then use that as the replacement global (the first
positional arg in the settings.configure() call).
Regards,
Malcolm
I should point out that there wasn't really any technical reason for
this decision and it's not because we're mean people. We just didn't
think that there might be a lot of use-cases when you wouldn't want to
specify all the changes from default yourself. Running scripts, however,
is the obvious one we forgot about.
So if you (or anybody else) wants to come up with a backward-compatible
change that allows for specifying a module that is laid over the top of
global_settings and then have the keyword args applied, go for it. Open
a ticket with the patch and I will give it serious consideration.
Regards,
Malcolm
On Fri, 2007-05-11 at 11:11 -0300, Bruno Tikami wrote:
> Hello Malcolm
>
> Thanks for you fast reply!!!!
>
> I'll try to put the missing settings on my project.settings . Do I
> have to call configure() in some diferent way after I do that? I mean,
> if my settings have all the global settings...
No. The first argument to configure() is a class or a module, so that
the code can access each of the settings as an attribute. So if you
project settings contains every single global setting, you will be able
to pass that in (boy is that going to be a big file, though). Note that
you may not actually need every single global setting, but you will need
a fair chunk of them, I expect.
Regards,
Malcolm