The current BASE_DIR calculation is simple, just 2 levels up from the
current file, i.e. parent folder of current folder.
This is not reliable because it assumes the settings file will stay in
project_name folder, no deeper.
However, if the user has multiple settings (say for each environment), he
may be willing to create a sub package inside project_name and specify the
"DJANGO_SETTINGS_MODULE" when running the server. This will be a problem
as the BASE_DIR is actually the project_name dir instead of its parent.
--
Ticket URL: <https://code.djangoproject.com/ticket/27861>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by Aymeric Augustin):
Yes, the logic must be updated if the file is moved deeper in the source
tree.
Do you have a more robust alternative to suggest?
--
Ticket URL: <https://code.djangoproject.com/ticket/27861#comment:1>
* status: new => closed
* type: Bug => Cleanup/optimization
* component: Uncategorized => Core (Other)
* resolution: => needsinfo
Comment:
It's also not clear to me that this is feasible.
--
Ticket URL: <https://code.djangoproject.com/ticket/27861#comment:2>