Expand ~ in .styxrc path
[styx.blog] / styx / settings.py
index e647c67..acfb631 100644 (file)
@@ -22,7 +22,7 @@ BASE_DIR = Path(__file__).resolve(strict=True).parent.parent
 # See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
 
 try:
-    with open('~/.styxrc', 'r') as styxrc:
+    with open(os.path.expanduser('~/.styxrc'), 'r') as styxrc:
         LOCAL_SETTINGS = json.loads(styxrc.read())
 
 except FileNotFoundError: