0

I want to use postgresql view to store intermediate result of queryset in django.

Is there a good way to create a view in django?

Below is the code of the flow I want!

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

# save elements to database view

# reuse the query results by using view

1 Answers1

0

You can use raw SQL query to do that read this page first.

Iftakhar
  • 41
  • 1
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – cursorrux Aug 27 '21 at 05:11
  • Please add further details to expand on your answer, such as working code or documentation citations. – Community Aug 27 '21 at 05:11