Code

Opened 3 years ago

Closed 3 years ago

#15386 closed (duplicate)

Fix PYTHONSTARTUP support in manage.py shell

Reported by: DirkWallenstein Owned by: nobody
Component: Core (Management commands) Version: master
Severity: Keywords: management shell startup
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The attached patch will allow to have project specific start-up scripts that,
for example, import all models for easy access.

PYTHONSTARTUP=/path/to/startup.py manage.py shell

Attachments (1)

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

Download all attachments as: .zip

Change History (2)

Changed 3 years ago by DirkWallenstein

Fix PYTHONSTARTUP support in manage.py shell

comment:1 Changed 3 years ago by julien

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

I'm going to close this as a dupe of #6682. I advise you to look into shell_plus which I think already caters for this: https://github.com/django-extensions/django-extensions/blob/master/django_extensions/management/commands/shell_plus.py

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.