#31387: Document that BASE_DIR is not a setting
-------------------------------------+-------------------------------------
Reporter: Eric Baumgartner | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Documentation | Version: 3.0
Severity: Normal | Resolution: needsinfo
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):
* resolution: => needsinfo
* status: new => closed
* summary: Document BASE_DIR setting. => Document that BASE_DIR is not a
setting
* type: Uncategorized => Cleanup/optimization
Comment:
Thanks. The first [https://docs.djangoproject.com/en/5.2/howto/overriding-
templates/#overriding-from-the-project-s-templates-directory search
result] says:
> The TEMPLATES setting and BASE_DIR will already exist if you created
your project using the default project template.
Accessing `settings.BASE_DIR` as if it's a setting is a misuse. I've seen
this before in third-party packages, e.g. [https://github.com/radusuciu
/django-
sqlfun/blob/12b4740ff02fa677f1ba97a12d4f2f0dd0c99314/sqlfun/utils.py#L160
django-sql-fun]. django-extensions defines it as their own setting.
We don't want to document it in settings, since it's not a setting. We
can't document every misuse.
Would you suggest we add a comment to the project template above where it
is defined? Closing as needsinfo pending a concrete suggestion.
--
Ticket URL: <https://code.djangoproject.com/ticket/31387#comment:4>
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 view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019abd08f546-81399a2b-028d-4a34-bd25-1619b269a8a4-000000%40eu-central-1.amazonses.com.