﻿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
6677	Duplicates apps in settings.INSTALLED_APPS	trbs	nobody	"Duplicated in settings.INSTALLED_APPS are not removed automaticly.

As my project grows and the application lists grows with it, i tent to split of parts into a different python project
which i include in every django site i build. For the settings.py of the website it includes all the defaults from myproject.conf.settings
but this sometimes leads to duplicated in the INSTALLED_APPS list. 

The duplicates are a human error and should not happen (or be avoided) but that doesn't mean it won't happen someday (specially with different developers working at the same site).

Attached to this ticket is a patch to check for duplicates while creating the django settings object in django.conf.__init__
I think that while developers should not put duplicates in there list, checking it while looping through DJANGO_SETTINGS_MODULE.INSTALLED_APPS and handling it explicitly is a good idea. (zen: Explicit is better then implicit)

The implementation currently uses a Set object, but could also be written with an
condition:
{{{
...
          if not app in new_installed_apps:
              new_installed_apps.append(app)
...
}}}

Would love to hear some comments on this :-)

As i think currently this is not checked/handled at all, the list just contains duplicate entries and that
could break some things, like registration in newformsadmin or databrowse.

Personally i believe it should check and either automaticly remove duplicates or raise some exception indicating
that duplicate values are not allowed."		closed	Core (Other)	dev		wontfix	settings, INSTALLED_APPS		Unreviewed	1	0	0	0	0	0
