开发者

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜