0

我想使用 postgresql 视图将查询集的中间结果存储在 django 中。

有没有在 django 中创建视图的好方法?

下面是我想要的流程代码!

elements = Element.objects.filter(is_active=True, eventcardad__isnull=False)

# save elements to database view

# reuse the query results by using view
4

1 回答 1

0

您可以使用原始 SQL 查询来执行此操作,请先阅读此页面

于 2021-08-27T05:10:23.980 回答