On 05/11/06 17:02, [EMAIL PROTECTED] wrote:

Regarding the dsn stuff i don't really care. Since the config file 
itself is python I can do in there whatever I like.

So +0 on that.

For putting the dsn in the env I'm -1 as it may cause security problems.
IMHO the only place where such config as a dsn belongs is in a file, 
ideally only readable by the executed program itself.

 > (myself included -- I am not about to put my production db
> password into a subversion repository that everyone in the company can
> read).
> 

settings.py: ----------
# Django settings for some project.

DEBUG = True
TEMPLATE_DEBUG = DEBUG

ADMINS = (
     ('John Doe', '[EMAIL PROTECTED]'),
)

MANAGERS = ADMINS
...
from settings_local import *



settings_local.py: ----------
DATABASE_ENGINE = 'someengine'
DATABASE_NAME = 'somedb'
DATABASE_USER = 'someuser'
DATABASE_PASSWORD = 'secret'

MANAGERS = (
     ('Frank Sinatra', '[EMAIL PROTECTED]'),
)
...


Global config and defaults go in settings.py.
Sensitive stuff and server specific settings/overrides go in 
settings_local.py.

settings.py goes in subversion.
settings_local.py does not.

I use this setup for all my projects, be it in Python, Java, PHP, whatever.

just my 2 cents
Steven

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to