djangotemplatespathsettingscustomizing

Customizing django settings file original template


Everybody have to change the settings.py file every time you start a new django project. I think this routine applies for everyone run the manage.py startproject myproject command, when you have to type the same admin name, timezone, templates_dir ... every freaking time.

So I thought if there is way to make this routine modifications came preset for you from the beginning?

I know there is a template file that startproject command use to prepare the settings file, I just can't find it anywhere. can anybody here give me the path of that file?

knowingly I'm using ubuntu and django 1.3.


Solution

  • Once you locate the Django installation (I'd search for it in /usr/share/pyshared/django, at least that is the location on Debian; on Gentoo it is /usr/lib/python<version>/site-packages/django), the location inside the package is conf/project_template.

    Anyway, I wouldn't generally recommend modifying the contents of a package installed by the package manager, instead consider using a virtualenv with its local customized Django installation.