Rename deploy config file and chenge its location

newer-dal
LEdoian 3 years ago
parent 728cf65703
commit 4fe6015ad6

@ -12,6 +12,7 @@ https://docs.djangoproject.com/en/3.1/ref/settings/
from pathlib import Path from pathlib import Path
from os.path import isfile from os.path import isfile
import os
DEBUG = True DEBUG = True
# Bad, old, already has been in Git... # Bad, old, already has been in Git...
@ -129,8 +130,9 @@ USE_TZ = True
AUTH_USER_MODEL = 'utils.MyUser' AUTH_USER_MODEL = 'utils.MyUser'
_HOME_ENV = os.getenv('HOME', '/home/wish')
SECRETS_FILE = '~/wish.secrets' _CONFIG_DIR = os.getenv('XDG_CONFIG_DIR', _HOME_ENV + '/.config/wish')
SECRETS_FILE = _CONFIG_DIR + '/deploycfg.py'
# Override settings # Override settings
if isfile(SECRETS_FILE): if isfile(SECRETS_FILE):
with open(SECRETS_FILE, "r") as f: with open(SECRETS_FILE, "r") as f:

Loading…
Cancel
Save