Code

Ticket #15386: fix-PYTHONSTARTUP-support-in-manage.py-shell.diff

File fix-PYTHONSTARTUP-support-in-manage.py-shell.diff, 647 bytes (added by DirkWallenstein, 3 years ago)

Fix PYTHONSTARTUP support in manage.py shell

Line 
1Index: django/core/management/commands/shell.py
2===================================================================
3--- django/core/management/commands/shell.py    (revision 15634)
4+++ django/core/management/commands/shell.py    (working copy)
5@@ -76,7 +76,7 @@
6                 pythonrc = os.environ.get("PYTHONSTARTUP")
7                 if pythonrc and os.path.isfile(pythonrc):
8                     try:
9-                        execfile(pythonrc)
10+                        execfile(pythonrc, imported_objects)
11                     except NameError:
12                         pass
13                 # This will import .pythonrc.py as a side-effect