Opened 17 years ago

Closed 11 years ago

#5936 closed Bug (fixed)

django-admin's shell --plain command doesn't respect PYTHONSTARTUP or .pythonrc settings

Reported by: Todd O'Bryan Owned by: nobody
Component: Core (Management commands) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

I think the check about whether or not the user specified the --plain option on the command line is unnecessary.

Attachments (1)

pythonstartup.patch (1.4 KB ) - added by Todd O'Bryan 17 years ago.

Download all attachments as: .zip

Change History (10)

by Todd O'Bryan, 17 years ago

Attachment: pythonstartup.patch added

comment:1 by Todd O'Bryan, 17 years ago

See the discussion at:

http://groups.google.com/group/django-developers/browse_thread/thread/8abc0b31323edfc4#

It turns out that, at least on Ubuntu, /etc/profile gets ignored, so that's why PYTHONSTARTUP didn't get used even when I didn't specify --plain. I still think it's the case that, even if --plain is used, the command should still try to load PYTHONSTARTUP and .pythonrc because that's what "plain" old python would do.

comment:2 by Todd O'Bryan, 17 years ago

Summary: django-admin's shell command doesn't respect PYTHONSTARTUP or .pythonrc settingsdjango-admin's shell --plain command doesn't respect PYTHONSTARTUP or .pythonrc settings

comment:3 by Simon G <dev@…>, 17 years ago

Triage Stage: UnreviewedDesign decision needed

comment:4 by Gabriel Hurley, 14 years ago

Severity: Normal
Type: Bug

comment:5 by Carl Meyer, 13 years ago

Easy pickings: unset
Triage Stage: Design decision neededAccepted
UI/UX: unset

Given that that "django-admin.py help shell" describes --plain simply as "use plain Python, not IPython", and plain Python normally would respect .pythonrc and PYTHONSTARTUP, it does seem like this ought to be changed so --plain still loads those files.

comment:6 by Jannis Leidel, 12 years ago

Needs documentation: set
Patch needs improvement: set

comment:7 by Aymeric Augustin, 12 years ago

Component: Core (Other)Core (Management commands)

comment:8 by andrewjesaitis, 11 years ago

comment:9 by Marc Tamlyn, 11 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top