Opened 8 years ago

Closed 22 months ago

#5936 closed Bug (fixed)

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

Reported by: toddobryan Owned by: nobody
Component: Core (Management commands) Version: master
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 toddobryan 8 years ago.

Download all attachments as: .zip

Change History (10)

Changed 8 years ago by toddobryan

comment:1 Changed 8 years ago by toddobryan

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

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 Changed 8 years ago by toddobryan

  • Summary changed from django-admin's shell command doesn't respect PYTHONSTARTUP or .pythonrc settings to django-admin's shell --plain command doesn't respect PYTHONSTARTUP or .pythonrc settings

comment:3 Changed 8 years ago by Simon G <dev@…>

  • Triage Stage changed from Unreviewed to Design decision needed

comment:4 Changed 4 years ago by gabrielhurley

  • Severity set to Normal
  • Type set to Bug

comment:5 Changed 4 years ago by carljm

  • Easy pickings unset
  • Triage Stage changed from Design decision needed to 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 Changed 3 years ago by jezdez

  • Needs documentation set
  • Patch needs improvement set

comment:7 Changed 2 years ago by aaugustin

  • Component changed from Core (Other) to Core (Management commands)

comment:8 Changed 22 months ago by andrewjesaitis

comment:9 Changed 22 months ago by mjtamlyn

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.
Back to Top