Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Uses mptt.managers.TreeManager as a base manager.

  • Loading branch information...
commit c9c43e11ae0428f47d19916f531fecb75d17c652 1 parent af529e6
@BertrandBordage authored
Showing with 9 additions and 10 deletions.
  1. +9 −10 cms/publisher/manager.py
View
19 cms/publisher/manager.py
@@ -1,8 +1,9 @@
# -*- coding: utf-8 -*-
-from django.db import models
+from mptt import managers
from cms.publisher.query import PublisherQuerySet
-class PublisherManager(models.Manager):
+
+class PublisherManager(managers.TreeManager):
"""Manager with some support handling publisher.
"""
def get_query_set(self):
@@ -15,11 +16,9 @@ def drafts(self):
def public(self):
return self.filter(publisher_is_draft=False)
-
- """
- def all(self):
- raise NotImplementedError, ("Calling all() on manager of publisher "
- "object is not allowed. Please use drafts() or public() method "
- "instead. If this isn't accident use get_query_set().all() for "
- "all instances.")
- """
+
+# def all(self):
+# raise NotImplementedError, ("Calling all() on manager of publisher "
+# "object is not allowed. Please use drafts() or public() method "
+# "instead. If this isn't accident use get_query_set().all() for "
+# "all instances.")
Please sign in to comment.
Something went wrong with that request. Please try again.