Project-level locale directory is not found when project is in a nested module
|Reported by:||anonymous||Owned by:||nobody|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
We have a Django project in a nested module structure, it looks something like this:
So our project-level locale is in
And settings.py is:
The documentation states:
- Then, it looks for a locale directory in the project directory, or more accurately, in the directory containing your settings file.
But the code takes the first level of the module structure:
Therefore the locale directory is being looked for here:
There is a workaround in that the path can be explicitly set in settings.LOCALE_PATHS.