#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.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/01070194b690076e-09c617de-aed8-4e05-9efc-e21d21f48daf-000000%40eu-central-1.amazonses.com.