About Archive Tag Cloud Translations RSS

You are writing a comment about A Different Approach to local_settings.py, here is a quick summary:

A concise look at an alternative way to use local_settings.py with Django, which makes it possible to store more specific settings in version control without mucking up deployment.


You are responding to this comment written by David Dahl on November 28th 2008, 17:43.

The best solution is to use the environment for all configuration. Configuration should not be a part of the source code as it is. Create a ~/.django_env.sh to hold all of your config info. import os into your settings.py and use os.environ.get('DJANGO_DB','sqlite3') to configure everything. This is the most portable way of doing things as well as makes it a snap to move your app to a new server.

Regards,

David


Please be aware that comment forms go stale after one hour.





Comments may make use of LifeFlow MarkDown. Raw html will be escaped.


Quick Introduction to LifeFlow MarkDown Syntax

A highlighted code block:

@@ ruby
def a (b, c):
  b * c
end
@@

Other common languages work as well: scheme, python, java, html, etc.

Other markdown syntax:

 ### This is an h3 title
#### This is an h4 title
**this is bold**
*this is italics*

1. This is an
2. ordered list

* And an unordered
* list too

[this is a link](http://www.lethain.com/ "Lethain")