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)
Change History (10)
by , 17 years ago
Attachment: | pythonstartup.patch added |
---|
comment:1 by , 17 years ago
comment:2 by , 17 years ago
Summary: | django-admin's shell command doesn't respect PYTHONSTARTUP or .pythonrc settings → django-admin's shell --plain command doesn't respect PYTHONSTARTUP or .pythonrc settings |
---|
comment:3 by , 17 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:4 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → Bug |
comment:5 by , 13 years ago
Easy pickings: | unset |
---|---|
Triage Stage: | Design decision needed → Accepted |
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 , 12 years ago
Needs documentation: | set |
---|---|
Patch needs improvement: | set |
comment:7 by , 12 years ago
Component: | Core (Other) → Core (Management commands) |
---|
comment:8 by , 11 years ago
I believe this was fixed by Tickets: #6682 and #3381. See commit https://github.com/django/django/commit/1f6b2e7a658594e6ae9507c5f98eb429d19c0c9d
comment:9 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
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.