I use the below:
is_local = request.client in ['127.0.0.1', 'localhost']
if is_local:
        from local_settings import *
else:
        from prod_settings import *

I got local_settings.py & prod_settings.py. Through hgignore, I ignore 
prod_settings.py so it doesn't go to my public repo.

P.S: since I run the site on webfaction where request.is_local returns true 
so I had to use the first line shortcut.

Joseph
http://www.jjude.biz

Reply via email to