﻿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
22780	LOCALE_PATHS should be a tuple	Tim Shaffer	nobody	"I was trying to track down why my project was not auto-reloading when files were changed using the dev server.

Turns out, it was an improperly configured LOCALE_PATHS setting. My LOCALE_PATHS was configured like this:

{{{
LOCALE_PATHS = (
    '/path/to/locale'
)
}}}

Which is actually a string and not a tuple since it does not have a trailing comma. This causes a problem in the autoloader, here:

https://github.com/django/django/blob/master/django/utils/autoreload.py#L98

Since LOCALE_PATHS is a string, calling basedirs.extend(LOCALE_PATHS) actually causes every character in the string to get appended to basedirs. Then it walks through the tree and tries to find .mo files. And since there are 3 slashes in the string, the autoloader attempts to search the root drive 3 times.

Bottom line is that having LOCALE_PATHS set to a string with slashes causes autoreloading to silently stop working while it attempts to search the entire root drive. 

This patch adds LOCALE_PATHS to the list of tuple_settings which checks to make sure it's a tuple."	Bug	closed	Core (Other)	dev	Normal	fixed			Accepted	1	0	1	0	0	0
