Question : call materialized view in django postgres
Answered by : trained-tuna
# Add the name of your materialized view in the Meta as shown at the bottom
from django.db import models
class CustomerOrderVolume(models.Model): unique_id = models.CharField(max_length=255, primary_key=True) customer_name = models.CharField(max_length=255) # Additional fields class Meta: managed = False db_table='customer_order_volume'
Source : | Last Update : Thu, 03 Mar 22