# \[GSOC 2024\] Auto-importing in the shell

**URL:** <https://forum.djangoproject.com/t/gsoc-2024-auto-importing-in-the-shell/30749>\
**Category:** Google Season of Code\
**Created:** [May 2, 2024, 7:22am UTC](https://forum.djangoproject.com/t/gsoc-2024-auto-importing-in-the-shell/30749 "2024-05-02T07:22:42Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![DevilsAutumn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/devilsautumn/32/10408_2.png) [@DevilsAutumn](https://forum.djangoproject.com/u/DevilsAutumn)\
**Post date:** [June 13, 2024, 6:42am UTC](https://forum.djangoproject.com/t/gsoc-2024-auto-importing-in-the-shell/30749/9 "2024-06-13T06:42:55Z")

</div>

Hi, One thing that I still feel would be better to add is the [SHELL\_IMPORTS](https://django-extensions.readthedocs.io/en/latest/shell_plus.html#additional-imports) settings. I see the the shell customization on 2 levels.

At level 1, users would just want to import extra modules, submodules, methods etc. And I think this will be the most common use case.  
At level 2, users would want to perform some kind of manipulation or do some pre-processing on their data. This one would be comparatively uncommon.

At this point, to achieve both levels, overriding `get_namespace` is the only option. But with `SHELL_IMPORTS` settings, we can super simplify things for atleast users at level 1(where most of the users lie?). As a developer, I would not want to create a bunch of files and folders, subclass a command and override a method just to import few methods/submodules/modules for testing. Rather I would prefer to write 3-4 lines in the settings.py and expect django to handle the complications of importing them.

Yes, If I had some complex operations to perform before launching the shell or want to use some other python runner, then I would definitely have no problem to subclass the shell command and override a method.

Would be happy to know the opinions of the community on this.

---

_[View the full topic](https://forum.djangoproject.com/t/gsoc-2024-auto-importing-in-the-shell/30749)._
