On Fri, 2009-02-13 at 04:57 -0800, zvoase wrote:
> Hi all,
>     Recently I wrote a blog post (http://bit.ly/HM3hC) on my project
> conventions; it began by talking about how I like to maintain
> different settings 'modes' for debugging, staging and production, and
> the ways in which I do this. I've had quite a few responses from
> Djangonauts on how they all do this, and it seems that this really is
> a pattern. In keeping with Django's DRYness principle, it would
> probably be better to factor some of this out into the Django
> codebase.

This isn't really a pattern that is either hard to implement (it's maybe
four lines of code) or necessarily a clearly best practice type of
thing. I don't see the benefit of including the sort of thing you've
mentioned in your blog for settings into Django.

We already support settings as a Python module so that imports work. How
people choose to do the importing depends on their personal preferences
(I don't find your particular approach that appealing myself, for
example). Encouraging or enforcing any particular approach there (beyond
"import other modules if you need to and factor out common stuff)
doesn't feel like it would be that helpful.


> 
> There are several advantages to be had from this prospective feature.
> Firstly, and most obviously, there's the benefit that it would ease
> the administration and deployment of large-scale projects across
> multiple machines. Secondly, it would provide open-source projects
> (for example, Pinax; see http://pinaxproject.org) a way to distribute
> sensible defaults with their source code, yet also allow continuously-
> integrated deployments to use custom (and potentially sensitive)
> settings, such as database authentication parameters.


Any application can already provide a module that you "import *" from in
your settings file if you want to. We've already discussed -- a lot --
in the past, on this list, the problems with auto-discovery of
application-specific settings (they can be order-dependent and/or have
conlicts; requiring the installing user to actually understand the
settings is a good thing there).

Malcolm


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to