One thing I've noticed is that some settings don't stick if I override
them in local_settings.py.
One key example is CACHE_BACKEND. Has anybody seen this sort of
behavior?
On Oct 23, 5:54 pm, felix <[EMAIL PROTECTED]> wrote:
> at the very bottom of settings.py :
>
> from local_settings import
I do it like this:
# settings.py
[ ... ]
try:
from settings_dev import *
except ImportError:
pass
# settings_dev.py
import os
DEBUG = True
DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = 'dev.db'
MEDIA_ROOT = os.path.abspath('../') + '/public/media/'
MEDIA_URL =
Thanks Ned!
Cheers
On Thu, Oct 23, 2008 at 7:08 PM, Ned Batchelder <[EMAIL PROTECTED]>wrote:
> And BTW, my bad. Change the except: line to except ImportError, then the
> syntax error from the dash will be apparent in your 500 page.
>
> --Ned.
> http://nedbatchelder.com
>
>
> Ned Batchelder
And BTW, my bad. Change the except: line to except ImportError, then
the syntax error from the dash will be apparent in your 500 page.
--Ned.
http://nedbatchelder.com
Ned Batchelder wrote:
> settings-custom isn't a valid Python file name, because a Python
> identifier can't have a dash in it.
settings-custom isn't a valid Python file name, because a Python
identifier can't have a dash in it. Use an underscore.
--Ned.
http://nedbatchelder.com
Dana wrote:
> Ned/Felix,
>
> Ok, I tried your guys solution but it does not seem to be working for
> me, so Im wondering where I goofed.
>
>
Never mind, answered my own problem. I had a missing setting that was
causing a 500 error before it could access the settings-custom.py.
Your solutions worked!
Thanks!
On Oct 23, 5:18 pm, Dana <[EMAIL PROTECTED]> wrote:
> Ned/Felix,
>
> Ok, I tried your guys solution but it does not seem to be
Ned/Felix,
Ok, I tried your guys solution but it does not seem to be working for
me, so Im wondering where I goofed.
Here is what ive got
My settings.py and settings-custom.py file are here:
config/
settings.py
settings-custom.py
The directory containing config is on the PythonPath,
In settings.py:
try:
from settings_local import *
except:
pass
--Ned.
http://nedbatchelder.com
Dana wrote:
> Hello everyone,
>
> I know a form of this question has been asked before on this group but
> I can't for the life of me find the thread.
>
> I am wondering how
Sweet, I knew it was simple :)
Thanks!
On Oct 23, 3:54 pm, felix <[EMAIL PROTECTED]> wrote:
> at the very bottom of settings.py :
>
> from local_settings import *
>
> this overwrites just the imported keys/values
>
> -flx
>
> On Thu, Oct 23, 2008 at 11:55 PM, Dana <[EMAIL PROTECTED]> wrote:
>
>
at the very bottom of settings.py :
from local_settings import *
this overwrites just the imported keys/values
-flx
On Thu, Oct 23, 2008 at 11:55 PM, Dana <[EMAIL PROTECTED]> wrote:
>
> Hello everyone,
>
> I know a form of this question has been asked before on this group but
> I can't for
Hello everyone,
I know a form of this question has been asked before on this group but
I can't for the life of me find the thread.
I am wondering how I can have a generic settings.py file that contains
all my basic settings and then have a settings-local.py (or
whatever...) and have that
11 matches
Mail list logo