Merge pull request #3 from andy840119/support-django-3.x
Upgrade package to support django 3.x
This commit is contained in:
@@ -55,3 +55,7 @@ docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
# ingore file created by pycharm
|
||||
.idea
|
||||
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
# placeholder for git
|
||||
from helpers import CreateView
|
||||
from models import DbView
|
||||
from dbview.helpers import CreateView
|
||||
from dbview.models import DbView
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from django.db import migrations
|
||||
from django.apps import apps
|
||||
|
||||
|
||||
class CreateView(migrations.CreateModel):
|
||||
def database_forwards(self, app_label, schema_editor, from_state, to_state):
|
||||
model = to_state.apps.get_model(app_label, self.name)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from django.db import models
|
||||
|
||||
|
||||
class ViewManager(models.Manager):
|
||||
def bulk_create(self, *args, **kwargs):
|
||||
raise NotImplementedError
|
||||
@@ -16,6 +17,7 @@ class ViewManager(models.Manager):
|
||||
def update(self, *args, **kwargs):
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
class DbView(models.Model):
|
||||
objects = ViewManager()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user