Sure, patches welcome. `django.conf.__init__` already has some 
"tuple_settings" logic which is looks like would probably work for this.

On Friday, June 6, 2014 11:51:30 AM UTC-4, Tim Shaffer wrote:
>
> I'm playing around with 1.7b4 and I was trying to track down why my app 
> 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'
> )
>
> At first glance, it looks okay. But it's actually a string and not a tuple 
> since it does not have a comma.
>
> This causes a problem in the autoloader, here:
>
>
> https://github.com/django/django/blob/608e6eb2959c6e56e5c702ca0d15fa0e6c2eef16/django/utils/autoreload.py#L98
>
> This would be fine, but 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 essentially take *forever*. 
>
> Maybe adding a warning/validation to ensure LOCALE_PATHS is a list/tuple 
> would be a good idea?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/657a7af7-033b-4578-a843-baac56f24a5e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to