Frage

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.

War es hilfreich?

Lösung

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.

Andere Tipps

I just keep a customized settings.py in my home directory and copy it to the project directory after running startproject. Simple and effective.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top