#36159: Update the shell customization tutorial to reflect the --no-imports flag.
-------------------------------------+-------------------------------------
Reporter: Salvo | Owner: Salvo Polizzi
Polizzi |
Type: | Status: assigned
Cleanup/optimization |
Component: | Version: 5.1
Documentation |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
The final section of this [
https://docs.djangoproject.com/en/dev/ref
/django-admin/#django-admin-shell 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.''
--
Ticket URL: <
https://code.djangoproject.com/ticket/36159>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.