Opened 6 days ago

Closed 6 days ago

Last modified 6 days ago

#36287 closed New feature (wontfix)

Provide a way to suppress messages for automatic shell imports for default verbosity.

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

Description (last modified by Collin Anderson)

Would be nice to have a way to surpress "objects imported automatically" message that appears when running manage.py shell.

Silence is golden: Ideally the message would not appear at the default verbosity.

Or otherwise if there's some method that could be overridden or monkeypatched to turn the message off?

Change History (3)

comment:1 by Collin Anderson, 6 days ago

Description: modified (diff)
Summary: Way to surpress "objects imported automatically" message.manage.py shell: Way to surpress "objects imported automatically" message.

comment:2 by Natalia Bidart, 6 days ago

Keywords: automatic imports shell added
Resolution: wontfix
Status: newclosed
Type: UncategorizedNew feature

Hello Collin, thank you for taking the time to create this ticket.

The automatic imports in the shell feature can be disabled via two options as documented:

  1. you can use the --no-imports flag, or
  2. you can provide your custom Shell command.

If this ticket is only about suppressing the messaging, but you still want the automatic imports to happen, you should set verbosity to 0. The current messaging for the default verbosity (which is 1) is quite succinct and adequate for that level.

If you disagree, the recommended path forward is to first propose and discuss the idea with the community and gain consensus. To do that, please consider starting a new conversation on the Django Forum, where you'll reach a broader audience and receive additional feedback.

comment:3 by Natalia Bidart, 6 days ago

Summary: manage.py shell: Way to surpress "objects imported automatically" message.Provide a way to suppress messages for automatic shell imports for default verbosity.
Note: See TracTickets for help on using tickets.
Back to Top