Skip to content

Commit

Permalink
Django 3.0 support
Browse files Browse the repository at this point in the history
  • Loading branch information
KillerDom1123 committed Sep 21, 2020
1 parent 8cc01e1 commit 3828dd8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
10 changes: 7 additions & 3 deletions README.md
Expand Up @@ -214,9 +214,9 @@ def customer_saved(sender, action=None, instance=None, **kwargs):

Postgres 9.4 and up allow materialized views to be refreshed concurrently, without blocking reads, as long as a
unique index exists on the materialized view. To enable concurrent refresh, specify the name of a column that can be
used as a unique index on the materialized view. Unique index can be defined on more than one column of a materialized
view. Once enabled, passing `concurrently=True` to the model's refresh method will result in postgres performing the
refresh concurrently. (Note that the refresh method itself blocks until the refresh is complete; concurrent refresh is
used as a unique index on the materialized view. Unique index can be defined on more than one column of a materialized
view. Once enabled, passing `concurrently=True` to the model's refresh method will result in postgres performing the
refresh concurrently. (Note that the refresh method itself blocks until the refresh is complete; concurrent refresh is
most useful when materialized views are updated in another process or thread.)

Example:
Expand Down Expand Up @@ -343,3 +343,7 @@ who have covered this in a bit more detail.
## Python 3 Support

Django PGViews supports Python 3 in versions 0.0.7 and above.

## Django 3.0 Note

Changed `from django.utils import six` to `import six` in the `views.py` file, and added `six` as a dependency module due to the module being removed from Django.
2 changes: 1 addition & 1 deletion django_pgviews/view.py
Expand Up @@ -10,7 +10,7 @@
from django.db import connection, transaction
from django.db.models.query import QuerySet
from django.db import models
from django.utils import six
import six
from django.apps import apps
import psycopg2

Expand Down
5 changes: 3 additions & 2 deletions setup.py
Expand Up @@ -16,7 +16,7 @@

setup(
name='django-pgviews',
version='0.5.5',
version='0.5.6',
description="Create and manage Postgres SQL Views in Django",
long_description=LONG_DESCRIPTION,
author='Scott Walton',
Expand All @@ -33,5 +33,6 @@
'Framework :: Django :: 1.9',
'Framework :: Django :: 1.10',
'Framework :: Django :: 1.11',
]
],
install_requires=['six']
)

0 comments on commit 3828dd8

Please sign in to comment.