Find file
Fetching contributors…
Cannot retrieve contributors at this time
67 lines (43 sloc) 2.25 KB


Inspired during DjangoCon 2011. After creating six projects to test during the talks, I realized that setting up the file to be more modular was a real pain. I wrote this little script to automate the process.

Quick Overview

Django's default way of doing settings kind of sucks. Adding:

  from local_settings import *
except ImportError:

to the bottom of the works, but it doesn't allow you to extend settings. So, for example, you can't add django-debug-toolbar to just your local development without overriding the entire INSTALLED_APPS tuple.

What this script does:

  1. Read in your current settings.
  2. Creates a new folder named settings within the project directory.
  3. Writes your current settings to within the new settings package.
  4. Creates a basic file which imports and looks for
  5. Creates an empty for your dev environment.
  6. Deletes the default (and settings.pyc, should it exist).

What You Get

Now you can edit for your dev environment and extend things like INSTALLED_APPS but just for you.





This is a simple script that does not need to be installed or compiled. It's a run-once-and-discard project. You will want to curl or wget the file to your project directory. Specifically to the directory where the default Django file resides.

curl -O

Or, if you prefer wget:



After downloading the file, run the script from your project directory.


Assuming everything goes as planned, you should see a message saying your settings are now a little more awesome.


Delete the file.