Import error in django settings . How to remove the error?
ImportError: Could not import settings 'file-patn/sett开发者_如何学Cings' (Is it on sys.path?): Import by filename is not supported.
My code has this
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
What changes need to be done in the code to remove the error ?
Just add this:
os.environ['DJANGO_SETTINGS_MODULE'] = 'application_path.settings'
Could it be that, you wanted to specify the Python import like:
file-patn.settings
instead?
精彩评论