为了账号安全,请及时绑定邮箱和手机立即绑定

把项目复制到linux 用manage运行没问题。用uwsgi运行报错

File "/usr/local/lib/python3.5/site-packages/django/apps/registry.py", line 249, in get_containing_app_config

    self.check_apps_ready()

  File "/usr/local/lib/python3.5/site-packages/django/apps/registry.py", line 132, in check_apps_ready

    raise AppRegistryNotReady("Apps aren't loaded yet.")

django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.

unable to load app 0 (mountpoint='') (callable not found or import error)

*** no app loaded. going in full dynamic mode ***

uWSGI running as root, you can use --uid/--gid/--chroot options

*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 

*** uWSGI is running in multiple interpreter mode ***

spawned uWSGI worker 1 (and the only) (pid: 22148, cores: 1)


正在回答

1 回答

这是在项目目录下新建的django_wsgi.py内容

#!/usr/bin/env python

# coding: utf-8


import os

import sys



os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myblog.settings")


from django.core.handlers.wsgi import WSGIHandler

application = WSGIHandler()

~                                    


0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
django入门与实践
  • 参与学习       65159    人
  • 解答问题       869    个

手把手带你进入Django开发的大门,充分领略Django的魅力

进入课程

把项目复制到linux 用manage运行没问题。用uwsgi运行报错

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信