clean up some deprecation warnings in django 1.7
Scott Baker [Fri, 12 Sep 2014 19:57:27 +0000 (12:57 -0700)]
planetstack/core/models/plcorebase.py
planetstack/core/models/user.py

index 59cac52..d1784cd 100644 (file)
@@ -22,15 +22,23 @@ except:
 # 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()
index d8355a2..9a62e34 100644 (file)
@@ -48,9 +48,13 @@ class UserManager(BaseUserManager):
         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: