Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/337.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 与Django uwsgi假脱机程序函数不存在关系_Python_Django_Uwsgi_Psycopg2 - Fatal编程技术网

Python 与Django uwsgi假脱机程序函数不存在关系

Python 与Django uwsgi假脱机程序函数不存在关系,python,django,uwsgi,psycopg2,Python,Django,Uwsgi,Psycopg2,我正在使用uwsgi运行Django 1.8应用程序。我正在尝试使用@spool decorator在后台处理程序中运行函数。该函数正在向我的模型添加数据 但是,当后台处理程序函数尝试保存对象时,会出现此错误: psycopg2.ProgrammingError: relation "bgsite_person" does not exist LINE 1: UPDATE "bgsite_person" SET "title" = NULL, "first_names" = N... 这是我的

我正在使用uwsgi运行Django 1.8应用程序。我正在尝试使用@spool decorator在后台处理程序中运行函数。该函数正在向我的模型添加数据

但是,当后台处理程序函数尝试保存对象时,会出现此错误:

psycopg2.ProgrammingError: relation "bgsite_person" does not exist
LINE 1: UPDATE "bgsite_person" SET "title" = NULL, "first_names" = N...
这是我的uwsgi配置文件:

[uwsgi]
http = :8000
module = BGMS.wsgi:application
chdir = /home/pete/GitHub/BGMS/BGMS
check-static = /home/pete/GitHub/BGMS/BGMS/BGMS/build/
home = /home/pete/.virtualenvs/bgms
env = DJANGO_SETTINGS_MODULE=BGMS.settings.development

master = true
processes = 4
threads = 1
lazy-apps = 1

spooler = /home/pete/Documents/
shared-import = /home/pete/GitHub/BGMS/BGMS/bgsite/spooler_functions.py
当我在普通工作程序中运行此函数时,没有问题


有什么想法吗?谢谢。

您能否运行
python manage.py showmigrations
以查看是否已运行Django应用程序的所有迁移文件?可能是因为自上次更改后,您没有运行任何新迁移。谢谢,但迁移都已应用。