1
2 import os
3 import sys
4 BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
5 sys.path.append(BASE_DIR)
6 os.environ['DJANGO_SETTINGS_MODULE'] = 'YOURAPP.settings'
7 os.environ.setdefault("DJANGO_SETTINGS_MODULE", "YOURAPP.settings")
8