I have this following method to create project as below.
import os
project_directory = "/Users/home/project_directory/"
def create_function(project_name):
os.system("django-admin.py startproject {0} {1}".format(
project_name,
project_directory
)
)
This works well when I use global python shell, But when I try same command using python manage.py shell I encounter following error. I thinking I am messing with python path, Please help me out
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named mysite.settings