diff --git a/docs/howto/custom-shell.txt b/docs/howto/custom-shell.txt index 07034dd197..f4df359981 100644 --- a/docs/howto/custom-shell.txt +++ b/docs/howto/custom-shell.txt @@ -42,16 +42,3 @@ The above customization adds :func:`~django.urls.resolve` and :func:`~django.urls.reverse` to the default namespace, which includes all models from all apps. These two functions will then be available when the shell opens, without a manual import statement. - -If you prefer to not have models automatically imported, create a custom -``get_namespace()`` that excludes the ``super().get_namespace()`` call: - -.. code-block:: python - :caption: ``polls/management/commands/shell.py`` - - from django.core.management.commands import shell - - - class Command(shell.Command): - def get_namespace(self): - return {}