Opened 3 months ago
Last modified 7 weeks 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 | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | yes |
Needs tests: | no | Patch needs improvement: | yes |
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
anddjango.utils.timezone
modules - Utilites for making or debugging database queries, namely
django.db.models
anddjango.db.models.functions
modules - Settings of your projects, namely
django.conf.settings
Change History (3)
comment:1 by , 3 months ago
Triage Stage: | Unreviewed → Accepted |
---|---|
Type: | Cleanup/optimization → New feature |
comment:2 by , 2 months ago
Has patch: | set |
---|
comment:3 by , 7 weeks ago
Needs documentation: | set |
---|---|
Patch needs improvement: | set |
Note:
See TracTickets
for help on using tickets.
Accepting following positive forum discussion. Thank you Salvo for raising this ticket, and working on it!