#36159: Remove the example of the empty import shell customization
-------------------------------------+-------------------------------------
Reporter: Salvo Polizzi | Owner: Salvo
Type: | Polizzi
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 5.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by Salvo Polizzi:
Old description:
> 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.''
New description:
The final section of this [
https://docs.djangoproject.com/en/dev/howto
/custom-shell/#customize-automatic-imports 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#comment:3>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.