we are doing the following pretty successfully:
inside settings.py
--------------------------

import local_config

DEBUG = local_config.DEBUG
TEMPLATE_DEBUG = local_config.DEBUG
LOG_LEVEL = local_config.LOG_LEVEL

DATABASE_ENGINE = local_config.DATABASE_ENGINE
DATABASE_NAME = local_config.DATABASE_NAME
DATABASE_USER = local_config.DATABASE_USER
DATABASE_PASSWORD = local_config.DATABASE_PASSWORD
DATABASE_HOST = local_config.DATABASE_HOST
DATABASE_PORT = local_config.DATABASE_PORT



and the local_config simply lies in the same dir as the settings.py
local_config.py
-------------------------

DATABASE_ENGINE = 'mysql'
DATABASE_NAME = 'dbname'
DATABASE_USER = 'root'
DATABASE_PASSWORD = ''
DATABASE_HOST = ''
DATABASE_PORT = ''
DEBUG = True



the clue is, that the local_config.py is NOT under version control!
we have a "local_config.py.default" that is under SVN, and locally you
always copy it initially, and adapt it as needed (usually just once).
So our deployed version always has DEBUG=false and stuff ... it pretty
handy imho

hih

wolfram



On 7/25/07, gorans <[EMAIL PROTECTED]> wrote:
>
> Thanks for the help.
>
> That's going to save me heaps and heaps of time.
>
> Thanks again.
>
> Goran
>
> On Jul 25, 10:01 am, "Russell Keith-Magee" <[EMAIL PROTECTED]>
> wrote:
> > On 7/24/07, gorans <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > I though that there could be a way to trick Django into reading
> > > special development settings for me, something like having a settings
> > > 'package' import separate settings files:
> >
> > No need for any special handling - just use the --settings option to
> > manage.py, or the DJANGO_SETTINGS_MODULE environment variable.
> >
> > ./manage.py --settings=mysite.localsettings runserver
> >
> > or
> >
> > ./manage.py --settings=mysite.serversettings runserver
> >
> > If there are common elements in the two settings file, then put
> >
> > from mysite.commonsettings import *
> >
> > at the top of your localsettings/serversettings file. This will pull
> > in all the settings from the common settings file.
> >
> > If putting your settings files into a package will make organization
> > easier, go right ahead - just remember to put the extra path into your
> > --settings. e.g.:
> >
> > ./manage.py --settings=mysite.settings.serversettings runserver
> >
> > Yours,
> > Russ Magee %-)
>
>
> >
>


-- 
cu

Wolfram

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

Reply via email to