CARVIEW |
Select Language
HTTP/2 200
server: nginx
content-type: text/html;charset=utf-8
cache-control: must-revalidate
expires: Fri, 01 Jan 1999 00:00:00 GMT
set-cookie: trac_form_token=95304439d4e29e49a5eb854b; HttpOnly; Path=/; Secure
set-cookie: trac_session=586f8109cf594369f80215c5; expires=Tue, 21 Oct 2025 05:26:35 GMT; HttpOnly; Path=/; Secure
strict-transport-security: max-age=31536000; includeSubDomains; preload
permissions-policy: interest-cohort=()
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
accept-ranges: bytes
via: 1.1 varnish, 1.1 varnish
date: Wed, 23 Jul 2025 05:26:35 GMT
x-served-by: cache-fra-eddf8230109-FRA, cache-bom-vanm7210092-BOM
x-cache: MISS, MISS
x-cache-hits: 0, 0
x-timer: S1753248395.069729,VS0,VE322
vary: Accept-Encoding
DjangoSettingsBashFunction – Django
Back to Top
Django
The web framework for perfectionists with deadlines.
Issues
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.
Last modified
20 years ago
Last modified on Dec 27, 2005, 3:42:52 AM
Note:
See TracWiki
for help on using the wiki.
Download in other formats:
Django Links
Learn More
Get Involved
Follow Us
- Hosting by In-kind donors
- Design by Threespot &
© 2005-2025 Django SoftwareFoundation unless otherwise noted. Django is a registered trademark of the Django Software Foundation.