mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +00:00
Initial import
This commit is contained in:
16
eve_api/api_puller/importer_path.py
Normal file
16
eve_api/api_puller/importer_path.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import os
|
||||
import sys
|
||||
# The path to the folder containing settings.py.
|
||||
BASE_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
|
||||
APPS_PATH = os.path.join(BASE_PATH, 'apps')
|
||||
|
||||
def fix_environment():
|
||||
"""
|
||||
Callable function to set up all of the Django environmental variables and
|
||||
pathing for directly executable python modules.
|
||||
"""
|
||||
from importer_path import BASE_PATH
|
||||
# Prepare the environment
|
||||
sys.path.insert(0, APPS_PATH)
|
||||
sys.path.insert(0, BASE_PATH)
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
|
||||
Reference in New Issue
Block a user