including constants

Nikola Skoric nick-news at net4u.hr
Sun Sep 13 20:44:25 CEST 2009


Hi there,

I have a simple problem and I know how to solve it :-D, but I suspect that
there is a standard solution which is more elegant.

So, here is my problem: I have django app versioned with svn and I
test my trunk on two different machines (one with mysql, another with
sqlite3). How do I remove database-definition constants from my
settings.py and put them in a separate file which wouldn't be
maintained by svn? (did I really hear somebody call that kind of file
"unversioned file" or did I make that up?) I suppose I could make a
trivial module with database info, import it and then assign my
constants with data from that module, but that looks so unelegant to
me. What's the standard way of doing this?

Thanks in advance.

-- 
"Now the storm has passed over me
I'm left to drift on a dead calm sea
And watch her forever through the cracks in the beams
Nailed across the doorways of the bedrooms of my dreams"



More information about the Python-list mailing list