django-postgres-matviews

django postgres matviews utils and commands


Keywords
django, postgres, matviews
License
Unlicense
Install
pip install django-postgres-matviews==2020.12.1

Documentation

Installation

$ [sudo] pip install django-postgres-matviews
settings.py
INSTALLED_APPS+=['django_postgres_matviews']

Examples

$ python manage.py refresh_matviews
$ python manage.py drop_matviews
$ python manage.py refresh_matview "matview1" "matview2"
$ python manage.py drop_matviews "matview1" "matview2"
from django_postgres_matviews.utils import drop_matview, drop_matviews, get_matviews, refresh_matview, refresh_matviews

refresh_matviews()
drop_matviews()

refresh_matview('matview1')
drop_matview('matview1')

for m in get_matviews():
    m.schemaname,m.matviewname

readme42.com