#19791: Rename BASE_DIR to PROJECT_ROOT
-------------------------------------+-------------------------------------
Reporter: pzinovkin | Owner: nobody
Type: | Status: closed
Cleanup/optimization | Version: master
Component: Uncategorized | Resolution: wontfix
Severity: Release blocker | Triage Stage: Design
Keywords: settings | decision needed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by aaugustin):
* status: new => closed
* resolution: => wontfix
Comment:
The name "PROJECT_ROOT" is inappropriate because it implies that a "Django
project" has a significant "root directory". That's wrong and misleading.
This name was already proposed and rejected in #16504 for this reason.
Python code needs to be on PYTHONPATH in order to be importable; it
doesn't need to be in a specific directory. In contrast, media and static
files need to be stored within a root directory. To make this difference
clear, we must keep the names "BASE_DIR" and "MEDIA/STATIC_ROOT" as
different as possible. "BASE_DIR" doesn't imply anything about the Django
project, and you can use a different layout if you wish.
It's a common misconception that the code for a Django project must be
inside the project (the best practice is to use virtualenv and friends).
This probably explains the large number of projects using PROJECT_ROOT in
the wild. By putting a different name in the default settings file, I hope
to reduce confusion at least a little.
I'm -1 on anything that contains "PROJECT" and -0 on anything that
contains "ROOT". Otherwise I don't really care. You're welcome to start a
discussion on the django-developers mailing list if you want to change the
name!
--
Ticket URL: <https://code.djangoproject.com/ticket/19791#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" 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].
For more options, visit https://groups.google.com/groups/opt_out.