﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
357	[patch]: django-admin.py needs a --projects parameter	hugo <gb@…>	Adrian Holovaty	"this parameter is to add stuff to the sys.path environment, so people don't need to either use admin rights to link their projects directory to some python path or use the PYTHONPATH environment variable.

{{{
Index: bin/django-admin.py
===================================================================
--- bin/django-admin.py (revision 535)
+++ bin/django-admin.py (working copy)
@@ -52,11 +52,15 @@
     parser = DjangoOptionParser(get_usage())
     parser.add_option('--settings',
         help='Python path to settings module, e.g. ""myproject.settings.main"". If this isn\'t provided, the DJANGO_SETTINGS_MODULE environment variable will be used.')
+    parser.add_option('--projects',
+        help='Python path to projects directory, e.g. where myproject of ""myproject.settings.main"" resides. If this isn\'t provided, the PYTHONPATH environment variable will be used.')
     options, args = parser.parse_args()
 
     # Take care of options.
     if options.settings:
         os.environ['DJANGO_SETTINGS_MODULE'] = options.settings
+    if options.projects:
+        sys.path.insert(0, options.projects)
 
     # Run the appropriate action. Unfortunately, optparse can't handle
     # positional arguments, so this has to parse/validate them.
}}}
"	enhancement	closed	Core (Management commands)		normal	fixed			Ready for checkin	1	0	0	0	0	0
