﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
36252	Duplicate entries in automatic imports in Django Shell	Raffaella	hesham hatem	"When customizing the automatic imports into the shell by adding the same import twice:
{{{
from django.core.management.commands import shell


class Command(shell.Command):
    def get_auto_imports(self):
        return super().get_auto_imports() + [
            ""django.urls.reverse"",
            ""django.urls.reverse"",
        ]
}}}

After opening the shell, while the total number of imports is correct, the `reverse` import is displayed twice in the output:


{{{
12 objects imported automatically:

  from project.newsletter.models import SubscriptionNotification, Subscription, Post, Category
  from django.contrib.sessions.models import Session
  from django.contrib.sites.models import Site
  from django.contrib.contenttypes.models import ContentType
  from django.contrib.auth.models import User, Group, Permission
  from django.contrib.admin.models import LogEntry
  from django.urls import reverse, reverse

}}}

"	Bug	closed	Core (Management commands)	5.2	Release blocker	fixed	shell	Raffaella	Ready for checkin	1	0	0	0	0	0
