Opened 9 months ago
Last modified 9 months ago
#36159 closed Cleanup/optimization
Remove the example of the empty import shell customization — at Version 3
| Reported by: | Salvo Polizzi | Owned by: | Salvo Polizzi |
|---|---|---|---|
| Component: | Documentation | Version: | 5.2 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description (last modified by )
The final section of this tutorial currently states:
If you prefer to not have models automatically imported, create a custom get_namespace() that excludes the super().get_namespace() call:
from django.core.management.commands import shell
class Command(shell.Command):
def get_namespace(self):
return {}
This section can be replaced with a simpler explanation:
To disable automatic importing entirely, use the --no-imports flag.
Change History (3)
comment:1 by , 9 months ago
| Version: | 5.1 → dev |
|---|
comment:2 by , 9 months ago
| Summary: | Update the shell customization tutorial to reflect the --no-imports flag. → Remove the example of the empty import shell customization |
|---|---|
| Triage Stage: | Unreviewed → Accepted |
| Version: | dev → 5.2 |
comment:3 by , 9 months ago
| Description: | modified (diff) |
|---|
Note:
See TracTickets
for help on using tickets.
I think you mean this section and I think it makes sense to remove the part "If you prefer to not have models automatically..." and example entirely as the
--no-importsflag is already documented 👍