INSTALLED_APPS * glob won't load apps with number in name
|Reported by:||Carl Meyer||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The resolution of the "foo.*" glob in INSTALLED_APPS checks isalpha() on the name of each subdirectory before trying to import it. This is stricter than it should be, since Python package names may contain numbers anywhere except at the beginning. This leads to apps with numbers in the package name mysteriously being left out of INSTALLED_APPS.
The solution is to instead check
d.isalnum() and d.isalpha() , which more closely matches the requirements for Python package names. Patch (with test) attached.