Specify config path directly in settings.py
The original code looks for the .env file starting in the directory of the Python file itself, not the current working directory.
This commit is contained in:
parent
750b4c762c
commit
6e8e1d040a
1 changed files with 1 additions and 3 deletions
|
@ -12,10 +12,8 @@ from django.core.exceptions import ImproperlyConfigured
|
|||
|
||||
# pylint: disable=line-too-long
|
||||
|
||||
print("Current working directory: ", os.getcwd())
|
||||
|
||||
env = Env()
|
||||
env.read_env()
|
||||
env.read_env("/etc/bookwyrm/config.env", recurse=False)
|
||||
DOMAIN = env("DOMAIN")
|
||||
|
||||
with open("VERSION", encoding="utf-8") as f:
|
||||
|
|
Loading…
Add table
Reference in a new issue