Opened 6 months ago

Last modified 4 days ago

#35680 assigned New feature

Add default automatic imports to shell

Reported by: Salvo Polizzi Owned by: Salvo Polizzi
Component: Core (Management commands) Version: dev
Severity: Normal Keywords:
Cc: Salvo Polizzi, Ülgen Sarıkavak Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

It could be useful for the final shell's user to have some default imports to avoid extra work of customizing to the user. Following this discussion https://forum.djangoproject.com/t/default-automatic-imports-in-the-shell/33708 , it appears that the most used objects are:

  • Utilities for date and timezone, namely datetime and django.utils.timezone modules
  • Utilites for making or debugging database queries, namely django.db.models and django.db.models.functionsmodules
  • Settings of your projects, namely django.conf.settings

Change History (7)

comment:1 by Natalia Bidart, 6 months ago

Triage Stage: UnreviewedAccepted
Type: Cleanup/optimizationNew feature

Accepting following positive forum discussion. Thank you Salvo for raising this ticket, and working on it!

comment:2 by Salvo Polizzi, 6 months ago

Has patch: set

comment:3 by Sarah Boyce, 5 months ago

Needs documentation: set
Patch needs improvement: set

comment:4 by Ülgen Sarıkavak, 4 months ago

Cc: Ülgen Sarıkavak added

comment:5 by Salvo Polizzi, 8 days ago

Needs documentation: unset
Patch needs improvement: unset

comment:6 by Sarah Boyce, 8 days ago

Needs documentation: set

comment:7 by Jacob Walls, 4 days ago

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