pvergain (framapiaf)<p>- <a href="https://adamj.eu/tech/2025/04/07/django-whats-new-5.2/#automatic-model-imports-in-the-shell" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">adamj.eu/tech/2025/04/07/djang</span><span class="invisible">o-whats-new-5.2/#automatic-model-imports-in-the-shell</span></a></p><p>The new How to customize the shell command (<a href="https://docs.djangoproject.com/en/5.2/howto/custom-shell" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">docs.djangoproject.com/en/5.2/</span><span class="invisible">howto/custom-shell</span></a>) documentation page covers adding extra automatic imports by defining a custom shell command override. </p><p>Here’s an example that goes beyond the docs:</p><p>Thanks <span class="h-card" translate="no"><a href="https://fosstodon.org/@adamchainz" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>adamchainz</span></a></span> 🙏🏻</p><p><a href="https://framapiaf.org/tags/python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>python</span></a> <a href="https://framapiaf.org/tags/webdev" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>webdev</span></a> <a href="https://framapiaf.org/tags/django" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>django</span></a> <a href="https://framapiaf.org/tags/Django5" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Django5</span></a>.2 <a href="https://framapiaf.org/tags/djangonews" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>djangonews</span></a></p>