Add default automatic imports to shell
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.functions
modules
- Settings of your projects, namely
django.conf.settings
Change History
(4)
Triage Stage: |
Unreviewed → Accepted
|
Type: |
Cleanup/optimization → New feature
|
Needs documentation: |
set
|
Patch needs improvement: |
set
|
Cc: |
Ülgen Sarıkavak added
|
Accepting following positive forum discussion. Thank you Salvo for raising this ticket, and working on it!