clean up some deprecation warnings in django 1.7
diff --git a/planetstack/core/models/plcorebase.py b/planetstack/core/models/plcorebase.py
index 59cac52..d1784cd 100644
--- a/planetstack/core/models/plcorebase.py
+++ b/planetstack/core/models/plcorebase.py
@@ -22,15 +22,23 @@
# This manager will be inherited by all subclasses because
# the core model is abstract.
class PlCoreBaseDeletionManager(models.Manager):
- def get_query_set(self):
+ def get_queryset(self):
return super(PlCoreBaseDeletionManager, self).get_query_set().filter(deleted=True)
+ # deprecated in django 1.7 in favor of get_queryset()
+ def get_query_set(self):
+ return self.get_queryset()
+
# This manager will be inherited by all subclasses because
# the core model is abstract.
class PlCoreBaseManager(models.Manager):
- def get_query_set(self):
+ def get_queryset(self):
return super(PlCoreBaseManager, self).get_query_set().filter(deleted=False)
+ # deprecated in django 1.7 in favor of get_queryset()
+ def get_query_set(self):
+ return self.get_queryset()
+
class PlCoreBase(models.Model):
objects = PlCoreBaseManager()
deleted_objects = PlCoreBaseDeletionManager()
diff --git a/planetstack/core/models/user.py b/planetstack/core/models/user.py
index d8355a2..9a62e34 100644
--- a/planetstack/core/models/user.py
+++ b/planetstack/core/models/user.py
@@ -48,9 +48,13 @@
return user
class DeletedUserManager(UserManager):
- def get_query_set(self):
+ def get_queryset(self):
return super(UserManager, self).get_query_set().filter(deleted=True)
+ # deprecated in django 1.7 in favor of get_queryset()
+ def get_query_set(self):
+ return self.get_queryset()
+
class User(AbstractBaseUser):
class Meta: