Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#13792 closed Uncategorized (wontfix)

Proposal - Refresh Django shell when code is changed (and saved)

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


What I'm referring to is the style in which the development server refreshes when you save a file in your project. Is it possible to add that functionality to the Django shell?

Change History (3)

comment:1 Changed 5 years ago by russellm

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

I can't see an obvious way to do this. Reload works for the development server because every request is isolated, so you can restart the entire system between requests. This isn't the case for the shell; the shell is long lived and stateful.

I'm open to suggestions, but absent of a specific course of action, I'm marking this wontfix.

comment:2 Changed 4 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

comment:3 Changed 3 years ago by deepak.iit@…

  • Easy pickings unset
  • Severity set to Normal
  • Type set to Uncategorized
  • UI/UX unset

A reload can be done with the following options:

  1. Rerun all the commands from the last reload() (import again and run all the lines of commands)
  2. Wipe out current data, reimport all the modules.

Option 2 is good enough most of the time.

Note: See TracTickets for help on using tickets.
Back to Top