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

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

Fix PYTHONSTARTUP support in manage.py shell

  • django/core/management/commands/shell.py

     
    7676                pythonrc = os.environ.get("PYTHONSTARTUP")
    7777                if pythonrc and os.path.isfile(pythonrc):
    7878                    try:
    79                         execfile(pythonrc)
     79                        execfile(pythonrc, imported_objects)
    8080                    except NameError:
    8181                        pass
    8282                # This will import .pythonrc.py as a side-effect
Back to Top