import os

from dotenv import load_dotenv

from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent

# according to https://code.google.com/archive/p/modwsgi/wikis/ApplicationIssues.wiki#Application_Working_Directory
# we should not use relative path in django projects
# we didn't have any problem on our local machines and AWS Lambda
# their working directory was the project path
# but when we use wsgi, apache sets the working directory to the root directory of our linux server
load_dotenv(dotenv_path=os.path.join(BASE_DIR, '.env.production'))


from wikiazma.settings_base import *

CRONTAB_DJANGO_SETTINGS_MODULE = 'wikiazma.settings_production'