Re: Default custom settings

2008-11-18 Thread Malcolm Tredinnick
On Tue, 2008-11-18 at 18:51 -0800, mdnesvold wrote: [...] > I guess your patterns would get the job done, even if they don't play > nicely with manage.py diffsettings. "diffsettings" only compares your settings file against global settings. So application settings are only ever going to show up

Re: Default custom settings

2008-11-18 Thread mdnesvold
>From the Django docs at : "Also note that your code should not import from either global_settings or your own settings file. django.conf.settings abstracts the concepts of default settings and site-specific set

Re: Default custom settings

2008-11-18 Thread bruno desthuilliers
On 18 nov, 16:43, mdnesvold <[EMAIL PROTECTED]> wrote: > On Nov 18, 2:15 am, bruno desthuilliers > > <[EMAIL PROTECTED]> wrote: > > What I usually do is to provide default values in the relevant app's > > module(s), ie: > > > # myapp.models.py > > from django.conf import settings > > MYAPP_FOO = g

Re: Default custom settings

2008-11-18 Thread Carl Meyer
On Nov 18, 10:43 am, mdnesvold <[EMAIL PROTECTED]> wrote: > The problem with using getattr(settings, 'MY_SETTING', default) is > that I'd have to specify the default value every time I access the > value; seems fairly un-DRY-ish, and if I ever want to change the > default, I'd have to track down e

Re: Default custom settings

2008-11-18 Thread mdnesvold
On Nov 18, 2:15 am, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > What I usually do is to provide default values in the relevant app's > module(s), ie: > > # myapp.models.py > from django.conf import settings > MYAPP_FOO = getattr(settings, "MYAPP_FOO", "default_foo") > > # etc... The problem

Re: Default custom settings

2008-11-18 Thread bruno desthuilliers
On 18 nov, 03:29, mdnesvold <[EMAIL PROTECTED]> wrote: > I'm writing an application that adds several app-specific settings. As > I'm developing, I'm just adding them to the end of my settings.py > file: > > MY_APP_FOO = 'foo' > MY_APP_BAR = ( >'bar', >'bam', >'baz', > ) > # and so on

Re: Default custom settings

2008-11-17 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-11-18, o godz. 03:29, przez mdnesvold: > > I'm writing an application that adds several app-specific settings. As > I'm developing, I'm just adding them to the end of my settings.py > file: > > MY_APP_FOO = 'foo' > MY_APP_BAR = ( > 'bar', > 'bam', > 'baz', > )

Default custom settings

2008-11-17 Thread mdnesvold
I'm writing an application that adds several app-specific settings. As I'm developing, I'm just adding them to the end of my settings.py file: MY_APP_FOO = 'foo' MY_APP_BAR = ( 'bar', 'bam', 'baz', ) # and so on So far, I have eleven such settings over 21 lines and expect to add several