Version 1 (modified by jim-django@…, 19 years ago) ( diff )

created page.

I've set up a quick shell function in my .bashrc which sets the DJANGO_SETTINGS_MODULE environment variable for me, allowing tab completion.

The function is:

django-settings ()
{
    export DJANGO_SETTINGS_MODULE=$1.settings
}

pop that into your ~/.bashrc and for your next logins, you'll be able to do something like the following:

$ cd projects
$ dja<tab>s<tab> my<tab>

which will autocomplete to django-settings myproject, and sets DJANGO_SETTING_MODULE to myproject.settings.

I presume here that you operate out of a "projects" directory which is on your pythonpath.

Note: See TracWiki for help on using the wiki.
Back to Top