Opened 5 years ago
Closed 5 years ago
#31387 closed Uncategorized (invalid)
Document BASE_DIR setting.
Reported by: | Eric Baumgartner | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 3.0 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
BASE_DIR appears to be an established setting. The default startapp template defines it.
And third-party apps like django_extensions rely on BASE_DIR being set.
However, the main settings documentation page does not mention BASE_DIR at all.
https://docs.djangoproject.com/en/3.0/ref/settings/
This led to confusion in the following case:
- Working with a legacy project that started around django 0.9.6 and has never defined BASE_DIR, to no apparent ill effect.
- While using django_extensions, an exception is raised ('Settings' object has no attribute 'BASE_DIR').
- Think: "Ok, that's fine, just need to define it, it's probably a newer setting."
- Go to django docs to see the definition of BASE_DIR. Find nothing!
- Now confused. Is BASE_DIR unofficial? Why is django_extensions relying on a non-standard setting?
It would be nice if BASE_DIR could be added to the settings documentation to resolve this confusion.
Change History (1)
comment:1 by , 5 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Summary: | Document BASE_DIR setting → Document BASE_DIR setting. |
Note:
See TracTickets
for help on using tickets.
BASE_DIR
is not a setting. It's a constant set and used only by a defaultsettings.py
template.