Heroku不想将我的django模型引用到视图中

时间:2021-12-22 02:46:41

I am deploying my application on and I have this error :

我在heroku上部署我的django应用程序,我有这个错误:

DatabaseError: referenced relation "question_view" is not a table

I am using a postgresql database where question_view is a view. I have not this problem when I run the application locally. Could someone please explain what is this error please ?

我正在使用postgresql数据库,其中question_view是一个视图。我在本地运行应用程序时没有这个问题。有人可以解释一下这个错误是什么吗?

1 个解决方案

#1


1  

I bypassed the problem by comment my models which reffered to views, and then sync the database (to create tables needed for administration).

我通过注释我的模型来绕过问题,这些模型引用了视图,然后同步数据库(以创建管理所需的表)。

#1


1  

I bypassed the problem by comment my models which reffered to views, and then sync the database (to create tables needed for administration).

我通过注释我的模型来绕过问题,这些模型引用了视图,然后同步数据库(以创建管理所需的表)。